[ncl-talk] Overlaying two maps with different axes

G.Monte at isac.cnr.it G.Monte at isac.cnr.it
Fri Aug 24 03:37:50 MDT 2018


Ok, thanks. Your explanations are now very clear to me, I am only
re-arranging the axes values in order to get the best overlayed plot.

Giulio Monte

> 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
>
>




More information about the ncl-talk mailing list