[ncl-talk] Avoiding overwritten gsnCenterString

Adam Phillips asphilli at ucar.edu
Thu Jun 20 10:35:28 MDT 2019


You could put a carriage return in the gsnCenterString for plot2 and put
two carriage returns in your plot3.
https://www.ncl.ucar.edu/Document/Language/carriage.shtml

This will result in the CenterString for plot3 being on top, the
CenterString for plot2 being in the middle, and the CenterString for
plot(2) being on the bottom.
Hope that helps!
Adam

On Wed, Jun 19, 2019 at 1:58 PM S Br via ncl-talk <ncl-talk at ucar.edu> wrote:

> Dear Dennis,
> Is there any alternate solution to avoid this overwriting. Do I need to
> set new resources for each overlay plot?
> I have tried defining 'gsnCentreString' like below but in this case, the
> resources written for plot(1) is also overwriting.
>
>     res at xyLineColors        = (/"green4"/) ; Line colours (white-to
> invisible the markov line)
>    plot(2) = gsn_csm_xy(wks, p11, spec1 at spcx, res)
>    res at xyLineColors        = (/"red"/) ; Line colours (white-to invisible
> the markov line)
>    plot2 = gsn_csm_xy(wks, p21, spec2 at spcx, res)
>
>    res at gsnCenterString     = "AMOnr PI"         ; change Center string
>    res at gsnLeftString       = "(b)"         ; change Left string
>    res at gsnStringFontHeightF = 0.010
>    res at xyLineColors        = (/"blue"/) ; Line colours (white-to
> invisible the markov line)
>    plot3 = gsn_csm_xy(wks, p31, spec3 at spcx, res)
>
>    overlay(plot(2),plot2)
>    overlay(plot(2),plot3)
>
> On Wed, Jun 19, 2019 at 3:57 PM Dennis Shea <shea at ucar.edu> wrote:
>
>> re: "is there any 'AUTOMATIC' way to avoid overwriting the
>> gsnCenterString?"
>>
>> Sorry, no.
>>
>>
>> On Wed, Jun 19, 2019 at 4:03 AM S Br via ncl-talk <ncl-talk at ucar.edu>
>> wrote:
>>
>>> Hi All,
>>> I am generating a multi lines panel plot with multiple overlay command.
>>> However, the 'gsngsnCenterString' defined is overwriting may be due to the
>>> use of multiple 'overlay' command and the CenterString becomes thicker.
>>> Is there any way to avoid overwriting the CenterString?
>>> ;**********************************
>>>   res at gsnCenterString     = "AMOnr PI"         ; change Center string
>>>    res at gsnLeftString       = "(b)"         ; change Left string
>>>    res at gsnStringFontHeightF = 0.010
>>>
>>>    res at xyLineColors        = (/"green4"/) ; Line colours (white-to
>>> invisible the markov line)
>>>    plot(2) = gsn_csm_xy(wks, p11, spec1 at spcx, res)
>>>    res at xyLineColors        = (/"red"/) ; Line colours (white-to
>>> invisible the markov line)
>>>    plot2 = gsn_csm_xy(wks, p21, spec2 at spcx, res)
>>>    res at xyLineColors        = (/"blue"/) ; Line colours (white-to
>>> invisible the markov line)
>>>    plot3 = gsn_csm_xy(wks, p31, spec3 at spcx, res)
>>>
>>>    overlay(plot(2),plot2)
>>>    overlay(plot(2),plot3)
>>> ;***************************************************
>>>
>>> Thank you.
>>> SB
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>


-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190620/7cb7bfa3/attachment.html>


More information about the ncl-talk mailing list