Re: Explicit tick marks and labels not plotting when using overlay

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Jun 23 2010 - 15:09:48 MDT

Hi Kay,

When you use "overlay" to overlay two plots, it will only use the tickmarks from the base plot. This is especially so you *don't* get the tickmarks from both objects, because usually this would be a mess (like including both contour and map tickmarks in a single plot).

If you want to draw all parts of both plots and keep them together for paneling later, then try using "gsn_add_annotation". This makes one plot an annotation of the other. If you resize the base plot, then the annotation will resize with it.

gsn_add_annotation assumes by default that you want to place one object over the dead center of the other object. If they both have the same viewport size, which you have, then you're good to go.
In your case, then, this means you don't need to set any special options in the third argument to gsn_add_annotation.

So, try replacing the "overlay" call with:

  anno = gsn_add_annotation(plotA, plotB, True)

For more annotation examples, see:

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

--Mary

On Jun 22, 2010, at 11:26 PM, Kay Shelton wrote:

> Hello,
>
> I am trying to overlay one xy plot onto another using the overlay function. Both plots have explicit tick marks and labels on the x-axis. When I overlay the plots, the tick marks and labels from the base plot show up but the ones from the transform plot do not. The data from the transform plot is plotted though.
>
> I have included a plot of what I am trying to achieve (ncl-help_draw). This was plotted without using overlay, but since I later wish to panel several plots I cannot call draw. I have also included the result from using the overlay function (ncl-help_overlay) and also what the individual plots look like (ncl-help_separate). The script used to produce ncl-help_overlay is also attached.
>
> Thank you for your help,
>
> Kay Shelton
> <ncl-help_draw.pdf><ncl-help_overlay.pdf><ncl-help_separate.pdf><ncl-help.ncl>_______________________________________________
> 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 Wed Jun 23 15:09:57 2010

This archive was generated by hypermail 2.1.8 : Thu Jun 24 2010 - 14:10:27 MDT