Re: Overlay

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 2 Oct 2008 08:26:20 -0600 (MDT)

On Thu, 2 Oct 2008, Marco Pastore wrote:

> Hi all.
>
> I need to overlay to one contour map plot (created using gsn_csm_contour_map)
> another contour map plot (using the same gsn resource).
> I produce the two plots and then i combine them with the command "overlay",
> but i recieve this error:
> "*fatal:NhlAddOverlay: plot class mapPlotClass cannot be overlay plot
> member"*
> In the examples you use for the main plot the gsn_csm_contour_map_overlay
> resource, but i can not use it.
>
> How can i do it ?
>
> Thanks, Marco

Hi Marco,

You cannot overlay one map plot on another. If you have a map plot,
this needs to be your base plot, and then everything else that you
overlay on this should be a non-map plot, like a contour plot.

So, instead of using gsn_csm_contour_map twice, use it once, and use
gsn_csm_contour for the overlay plot:

   base = gsn_csm_contour_map(wks,data1,res1)
   plot = gsn_csm_contour(wks,data2,res2)

   overlay(base,plot)
   draw(base)
   frame(wks)

Example 6 at:

   http://www.ncl.ucar.edu/Applications/conOncon.shtml

shows how to overlay several contour plots on a single contour/map
plot.

Example 1 shows a similar thing, except the base plot is
a gsn_csm_pres_hgt plot, instead of a map plot.

--Mary

> --
> ### ### ### ### ###
>
> MARCO PASTORE
>
> Istituto Nazionale di Geofisica e Vulcanologia
> Gruppo Nazionale di Oceanografia Operativa
> Viale Aldo Moro 44
> 40128, Bologna
>
> Tel:(+39)051-3782649
> Cel:(+39)339 8273965
>
> Skype: mapas71
>
> ### ### ### ### ###
> _______________________________________________
> 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 Thu Oct 02 2008 - 08:26:20 MDT

This archive was generated by hypermail 2.2.0 : Tue Oct 07 2008 - 09:09:48 MDT