[ncl-talk] gsn_csm_x2y2

Adam Phillips asphilli at ucar.edu
Tue Jun 26 11:20:33 MDT 2018


Hi Laura,
Yes, following the descriptive syntax used in the function description:
https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_x2y2.shtml
x1 = ispan(1980,2005,1)
y1 = new((/3,dimsizes(x1)/),float)
; fill in y1
x2 = ispan(-15,15,1)
y2 = new(dimsizes(x2),float)
; fill in y2

Note that the three curves put in y1 are either of the exact same size, or
are put into an array that spans all three. For instance:
x1 = ispan(1980,2005,1)
y1 = new((/3,dimsizes(x1)/),float)
y1!1 = "time"
y1&time = x1
y1(0,{1995:2000}) = (/1.4,5.2,3.1,-0.1,3.5,-2.2/)
y1(1,{1980:1982}) = (/-0.1,3.5,-2.2/)
y1(2,{2003:2005}) = (/1.1,5.9,3.2/)
Hope that helps!
Adam







On Tue, Jun 26, 2018 at 10:03 AM Laura Fowler <laura at ucar.edu> wrote:

> Hi:
> I used the function gsn_csm_x2y2 to plot two arrays on different x-axis
> and y-axis. Is there an "easy" way to plot 3 curves on one set of x and y
> axis (left/bottom axes) and one other curve on the right/top axis?
>
> Thanks,
> Laura
>
>
>
>
> --
>
> !-------------------------------------------------------------------------------------------------------------
> Laura D. Fowler
>
> Mesoscale and Microscale Meteorology Division (MMM)
> National Center for Atmospheric Research
> P.O. Box 3000, Boulder CO 80307-3000
>
> e-mail: laura at ucar.edu
> phone: 303-497-1628
>
>
> !-------------------------------------------------------------------------------------------------------------
> _______________________________________________
> 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/20180626/f3e73ebb/attachment.html>


More information about the ncl-talk mailing list