[ncl-talk] Some issue with plot
Mary Haley
haley at ucar.edu
Tue Nov 13 13:30:25 MST 2018
Anahita,
You are calling gsn_csm_xy2 two times with the exact same arguments, so it
doesn't surprise me that you have two identical plots:
plot = gsn_csm_xy2 (wks,aa,ams_alt,qcls_co2,resL,resR) ; create plot
plot = gsn_csm_xy2 (wks,aa,ams_alt,qcls_co2,resL,resR)
This function is explicitly for allowing you to plot two Y curves that have
different axes, but share the same X data, so one call is all you need:
plot = gsn_csm_xy2 (wks,aa,ams_alt,qcls_co2,resL,resR) ; create plot
If the plot that you're getting is not what you expected, then email
ncl-talk again and provide more detail on what you want.
Thanks,
--Mary
On Tue, Nov 13, 2018 at 12:38 PM, Anahita Amiri Farahani <aamir003 at ucr.edu>
wrote:
> Dear All,
>
> I used *gsn_csm_xy2*
> <https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_xy2.shtml> to
> draw two lines each with their own separate Y-axis, but it gives me two
> identecal plots. Here is the code and Attached is the plot:
>
>
> ;************************************************
> wks = gsn_open_wks ("eps","time_vs_alt") ; send graphics
> to PNG file
>
> resL = True ; plot mods desired
> resL at tiMainString = "Altitide vs. Time" ; add title
>
> resR = True
> resR at xyLineColors = "blue" ; line color
>
> plot = gsn_csm_xy2 (wks,aa,ams_alt,qcls_co2,resL,resR) ; create plot
> plot = gsn_csm_xy2 (wks,aa,ams_alt,qcls_co2,resL,resR)
> delete(wks)
>
>
>
> Thanks,
> Ana
>
> _______________________________________________
> 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/20181113/ef58558b/attachment.html>
More information about the ncl-talk
mailing list