[ncl-talk] Overlaying two plots onto the same contour map

Rashed Mahmood rashidcomsis at gmail.com
Wed Nov 20 07:08:47 MST 2019


Hi Giulio,
The following should NOT work in your example (since you are not plotting a
map plot here):
   tb_plot = gsn_csm_contour_map(wks,tb,tres)

It should be " tb_plot = gsn_csm_contour(wks,tb,tres)"

I do not know if there are other issues, if there are please provide full
script and a picture and may be the data file.

Cheers,
Rashed






On Wed, Nov 20, 2019 at 11:49 AM G.Monte--- via ncl-talk <ncl-talk at ucar.edu>
wrote:

> Dears all,
> I have some problems in overlaying two plots onto the same contour map.
> The data fields to be overlayed are arranged into an ascii file and are
> read in the following way by NCL 6.4.0:
> ;---read longitude
> lon  = dataf(:,4)
>
> ;---read latitude
> lat  = dataf(:,3)
>
> ;---read tb
> tb   = dataf(:,6)
>
> ;---read data
> flag = dataf(:,11)
>
> For plotting them, I follwed the template shown in overlay_12.ncl, where I
> set:
> ;---Create the two plots
>   tb_plot = gsn_csm_contour_map(wks,tb,tres)
>   vv_plot = gsn_csm_contour(wks,flag,dres)
> ;---Overlay the vv plot on the tb plot
>   overlay(tb_plot,vv_plot)
> ;---Drawing the tb plot will also draw vv plot
>   draw(tb_plot)
>   frame(wks)
>
> By doing so, only the second data field (named "flag") appeared in the
> plot, while the first field (named "tb") did not; it appears only if I
> plot them separately.
> I really don't understand the reason, I kindly ask you a suggestion.
>
> Thank you,
> Giulio
>
> _______________________________________________
> 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/20191120/2f0dcfd2/attachment.html>


More information about the ncl-talk mailing list