Re: Multiple overlays on contour map

From: Nicole Schiffer <nschiff2_at_nyahnyahspammersnyahnyah>
Date: Tue Aug 17 2010 - 08:51:22 MDT

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
Received on Tue Aug 17 08:51:32 2010

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