[ncl-talk] gsn_csm_x2y2
Laura Fowler
laura at ucar.edu
Wed Jun 27 12:54:16 MDT 2018
Hi Adam:
Thanks for your quick reply yesterday. I did look at the description
of gsn_csm_x2y2.shtml as well as example xy_20.ncl where that function
is used. I got confused because it did not address my specific issue,
or so I thought. I was able to make it work following your suggestion.
Thanks gain,
Laura
On Tue, Jun 26, 2018 at 11:20 AM, Adam Phillips <asphilli at ucar.edu> wrote:
> 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
>
--
!-------------------------------------------------------------------------------------------------------------
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
!-------------------------------------------------------------------------------------------------------------
More information about the ncl-talk
mailing list