Re: displaying two label bars for two contour plots

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Apr 03 2013 - 09:53:18 MDT

Hi Claudia,

If you want to draw one plot on top of another (called an "overlay"), it is better to the "overlay" procedure rather than just drawing the two plots in the same space.

When you use "overlay", the base plot is usually a contour/map plot, and the overlay plot is just a contour or vector plot (you can't overlay a map on a map).
The overlay plot gets transformed into the data space of the base plot, and actually becomes part of the base plot. In your case, however, since you set tfDoNDCOverlay to True, there won't be any computational transformation, but the two plots will be drawn in the same space, and only the tickmarks from the base plot will be drawn, which is convenient.

So, instead of this code:

  plot2 = gsn_csm_contour_map(wks,cloud_sub,res) ; Draw original grid on map
  . . .

try this code:

  plot2 = gsn_csm_contour(wks,cloud_sub,res) ; Draw original grid on map
. . .

Also, you don't have to go through the whole effort of turning off tickmarks for plot2. The "overlay" procedure will do this for you.

See example overlay_10.ncl at:


On Apr 3, 2013, at 7:03 AM, Claudia Walters wrote:

> I am trying to show two contour plots in the same map and am having difficulty getting two label bars to show up. I have tried changing the orientation of one to vertical, but then the map area gets resized and doesn't overlay correctly anymore. I have also tried resizing the label bar, so the two label bars would fit side-by-side, but I am having difficulty moving it off-center.
> Thanks for your help,
> Claudia
> <legend_2.ncl>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Wed Apr 3 09:53:31 2013

This archive was generated by hypermail 2.1.8 : Thu Apr 04 2013 - 21:06:41 MDT