Re: Multiple overlays on contour map

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Aug 17 2010 - 09:21:44 MDT

Hi all,

Thanks for the explanation Nicole.

I actually prefer using the "overlay" call over functions like gsn_csm_contour_map_overlay, because you can
better control the resources for each plot.

The other important things about overlays is that the data space that you are overlaying the same plots on must be the same (or at least close to the same).

Finally, if you are going to overlay plots onto a map, only the base plot (the first argument in "overlay") can be a map. You cannot overlay a map on another map.
You also cannot overlay a map onto a contour or vector plot.

For more overlay examples, see:

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

Here are some other overlay specific examples:

http://www.ncl.ucar.edu/Applications/HDF.shtml (hdf4sds_5.ncl)
http://www.ncl.ucar.edu/Applications/tigge.shtml (tigge_3.ncl)
http://www.ncl.ucar.edu/Applications/conOncon.shtml (conOncon_9.ncl)

--Mary

On Aug 17, 2010, at 8:51 AM, Nicole Schiffer wrote:

> Repeating the overlay procedure works well as long as you overlay the contours in the correct order.
>
> The first argument of the overlay function is the bottom layer and serves as the variable name for the resulting overlaid plot. For example, the following lines of code plot bcont on the bottom, cont on top of that, bvect on top of that, and vect on top of everything. (I used successive iterations to plot background contours, contours, background vectors, and vectors on a single map.)
>
> overlay(bcont,cont)
> overlay(bcont,bvect)
> overlay(bcont,vect)
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> * Nicole Schiffer
> * Graduate Research Fellow (Dept. of Energy)
> * Department of Atmospheric Sciences
> * University of Illinois, Urbana-Champaign
> * Email: nschiff2 [at] illinois [dot] edu
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Hi Seth,
>
> I guess the netcdf files containing the 'boundaries of several subregions' have the lat-lon points along these boundaries. In this case,
> you can check out the examples related to polygons,poylines etc and use gsn_add_polygon kind of functions.
>
> Otherwise, you can simply try the 'overlay' procedure .
>
> cheers,
> saji
>
> On Tue, Aug 17, 2010 at 3:56 PM, Seth McGinnis <mcginnis@ucar.edu> wrote:
> Example 2 on the "Contours overlaid on contours" page on the NCL website shows
> how to use gsn_csm_contour_map_overlay to plot two sets of contours on a map.
>
> Is there a way to overlay three or more sets of contours on a map? The
> function takes two sets of data, rather than one set of data and an existing
> graphic, so I don't see any way to chain it.
>
> I want to fill-contour some topographic data and then overplot the boundaries
> of several sub-regions, each of which is defined by its own netcdf mask file.
> The regions don't overlap, so I suppose I could add the masks together and
> overplot their union, but I was wondering if there was a more loop-oriented way
> to do it.
>
> Thanks!
>
> --Seth McGinnis
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 17 09:22:06 2010

This archive was generated by hypermail 2.1.8 : Tue Aug 17 2010 - 15:33:24 MDT