[ncl-talk] Limiting X-axis for a line in the Spectrum analysis

Rick Brownrigg brownrig at ucar.edu
Fri Jun 28 10:17:23 MDT 2019


I don't know for certain, but what about setting the data for the 3rd line
to _FillValue for years greater than 40?

Rick
On Fri, Jun 28, 2019 at 10:02 AM S Br via ncl-talk <ncl-talk at ucar.edu>
wrote:

> Hi All,
> I have generated the attached spectrum analysis with three series of data.
> I have used overlay to plot three lines for this figure. In this, the
> X-axis ranges from 0 to 100. However, I don't want to show one of the
> spectrum line (e.g. Var3) beyond year 40. The first two series should show
> the spectrum with the X-axis 0 to 100 year but third spectrum line should
> plot up to year 40 (not beyond that).
>
> I have tried by limiting the X-axis as shown below but doesn't work.
>
>  res = True                                      ; no plot mods desired
>    res at gsnDraw                =  False
>    res at gsnFrame               =  False
>    res at trYMinF              = 0                 ; manually set lower
> limit Y axis
>    res at trYMaxF              = 15             ; manually set upper limit Y
> axis
>    res at trXMinF              = 0                 ; manually set lower
> limit X axis
>    res at trXMaxF              = 100             ; manually set upper
>
>   res at xyLineColors        = (/"green4"/) ; Line colours (white-to
> invisible the markov line)
>    plot(0) = gsn_csm_xy(wks, p1, spec1 at spcx, res)
>    delete(res at gsnCenterString)    ; no center string for the following
> plot
>    delete(res at gsnLeftString)    ; no center string for the following plot
>    res at xyLineColors        = (/"red"/) ; Line colours (white-to invisible
> the markov line)
>    plot2 = gsn_csm_xy(wks, p2, spec2 at spcx, res)
>
>    delete(res at trXMinF)
>    delete(res at trXMaxF)
>    res at trXMinF              = 0                 ; manually set lower
> limit X axis
>    res at trXMaxF              = 40             ; manually set upper limit X
> axis
>    res at xyLineColors        = (/"blue"/) ; Line colours (white-to
> invisible the markov line)
>    plot3 = gsn_csm_xy(wks, p3, spec3 at spcx, res)
>
>    overlay(plot(0),plot2)
>    overlay(plot(0),plot3)
>
>
>
>
>
>
>
>
>
>
>
>
>
> Thank you.
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190628/871f4641/attachment.html>


More information about the ncl-talk mailing list