Re: Vector-contours overlay

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 23 Oct 2006 08:50:45 -0600 (MDT)

On Mon, 23 Oct 2006, Prince K. XAVIER wrote:

> Hi all,
>
> My aim is to plot 3 quantities in the same panel; 1.Wind vectors,
> 2.SST(shaded contours) and OLR (contours). the plot section of my script
> looks something like this...
>
> res = True
> res_at_gsnDraw = False res_at_gsnFrame = False
> ..........
> ..........
> plot1=gsn_csm_vector_scalar_map_ce(wks,u10jjas,v10jjas,sstjjas,res)
> plot2=gsn_csm_contour_map_ce(wks,olrjjas,res)
> overlay(plot1,plot2)
> draw(plot1)
> frame(wks)
>
> The error I get is "fatal:NhlAddOverlay: plot class mapPlotClass cannot be
> overlay plot member". I couldn't figure out what is wrong. Is there a way
> this can be accomplished?
>
> Thanks in advance
> prince

Hi Prince,

I think you are almost there. You can't overlay one map plot on top of
another. The way "overlay" works is that it takes the second plot
(the one that's being overlaid), and transforms it to the data space
of the first plot (the base plot). This second plot, then, should just
be a something like contour, vector, or streamline plot that is
*not* on a map.

I think if you change plot2 so that it is just a contour plot
and not a contour plot over a map, you should be set:

   plot1=gsn_csm_vector_scalar_map_ce(wks,u10jjas,v10jjas,sstjjas,res)
   plot2=gsn_csm_contour(wks,olrjjas,res)

Note that you should set up a different resource list for plot2,
because "res" may have some map resources attached, and you can't
apply these to "gsn_csm_contour".

--Mary

> --
> Prince K. XAVIER Laboratoire de Meteorologie Dynamique
> Ecole Normale Superieure
> 24 Rue Lhomond 75231 Paris cedex 05 FRANCE
> Tel: +33 (0)1 44 32 22 32
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 23 2006 - 08:50:45 MDT

This archive was generated by hypermail 2.2.0 : Mon Oct 23 2006 - 08:51:16 MDT