Re: Overlay with polylines/text

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Mon Oct 31 2011 - 10:48:50 MDT

Hi Dan,
Thanks for providing a quick/clean case for us to run. I think the
problem is what you suggested it is: when to call draw and frame. What
needs to happen in order:

1) Create the map plot. Do not draw (due to use of gsn_add_* functions
later) or advance the frame.
2) Call gsn_add_* functions to add stuff to the map plot.
3) Draw the map plot.
4) Create the XY-plot. Do not draw (again due to the use of gsn_add_*
functions) or advance the frame.
5) Call gsn_add_* functions to add stuff to the xy-plot.
6) Draw the xy-plot. (No need to overlay onto the map plot as it's not
being placed over the map plot.)
7) Draw any text,polylines,etc. that DO NOT use gsn_add_* functions.
You're not doing this yet, but in case you do...
8) Advance the frame.

Technically the drawing of the map plot could happen at the same time as
the drawing of the xy-plot.

I've attached a modified version of your script, along with one of the
resulting .png files. Let me know if you have any questions about what I
did.. Adam

On 10/31/2011 08:23 AM, Daniel Adriaansen wrote:
> Hello everyone,
> I am attempting to create a complex overlay plot consisting of a map on
> one side with an xy sounding plot on the other side. I have
> successfully gotten the map, legend for the map, polymarkers on the map,
> the xy plot, and some text added on the xy plot using gsn_text_ndc(). I
> then wanted to add two polylines on top of the xy plot, and will
> eventually want to add more text as well however I am having trouble
> getting the lines to appear. I think all I need is help deciphering the
> order in which to draw the map, overlay the xy plot object on the map,
> and add all my text and polylines using the gsn_xxx() functions. I have
> tried multiple orders of drawing, framing, and overlaying and can't seem
> to get the lines to appear. I'd appreciate any feedback/suggestions.
> The script below will run and create images so you can see what the
> images currently look like.
> The script and required input files can be found at:
> Please execute the script using the command (requires ncl-6.0.0 or later):
> ncl example.ncl 'yyyymmdd="20101231"' 'hr="00"'
> Thanks in advance.
> -Dan
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

Adam Phillips                      
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:

Received on Mon Oct 31 10:48:57 2011

This archive was generated by hypermail 2.1.8 : Tue Nov 01 2011 - 13:43:04 MDT