[ncl-talk] Overlaying two maps with different axes

Guido Cioni guidocioni at gmail.com
Thu Aug 23 03:04:07 MDT 2018


Yes you can do it and, as suggested by Adam, you just have to re-arrange your call to draw. 

Here is an example. Suppose qc is 2-D (time, height) and hbl is 1-D (time). Then you can overlay them like this 

resc at gsnDraw = False
resc at gsnFrame = False

...resources for contour plot...

resxy at gsnDraw = False
resxy at gsnFrame = False

...resources for xy plot...

resc at sfYArray = height
resc at sfXArray = time

plot = gsn_csm_contour(wks,qc,resc)
over = gsn_csm_xy(wks,time,hbl,resxy)
overlay(plot,over)

draw(plot)
frame(wks)

The overlay function will take care of adjusting the axes, unless you have completely different values. In that case you need to re-define the x and y axes to be the same values. 

The result looks something like this (ignore the red line): qc is the filled contour and hbl the grey dashed line





> On 23. Aug 2018, at 10:50, G.Monte at isac.cnr.it wrote:
> 
> <map_plots.zip>


Guido Cioni
http://guidocioni.altervista <http://guidocioni.altervista/>.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180823/c77846ee/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: profile.pdf
Type: application/pdf
Size: 145582 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180823/c77846ee/attachment.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180823/c77846ee/attachment-0001.html>


More information about the ncl-talk mailing list