[ncl-talk] Multiple Attached Grid Lines on One Plot

Mary Haley haley at ucar.edu
Fri Apr 14 10:30:29 MDT 2017


Hi Dan,

Good question.

It's an unadvertised feature that we should perhaps advertise.

When calling gsn_coordinates, you can set:

pres at gsnCoordsAttach = True

What this does is instead of drawing the coordinates right at that call, it
attaches them to the input plot, much in the same way that the
gsn_add_polyxxx functions work.  You then have to draw the plot to see the
attached lines or markers.

By setting gsnCoordsAttach, you can attach as many sets of coordinates to
the same plot as you want. I've included a non-sensical example, but it's
one you should be able to run as-is.  It draws the same grid three times,
two times using markers and the third time using lines.

I've been meaning to create an examples page explicitly for using
gsn_coordinates, and even have the scripts ready to go, but I haven't
finished it.

--Mary



On Thu, Apr 13, 2017 at 11:43 AM, Daniel Rosen - NOAA Affiliate <
daniel.rosen at noaa.gov> wrote:

> Is there a way to attach multiple data coordinate sets with different
> colors on the same plot?
> Or to create two plots with different attached data coordinates and then
> combine them to one?
>
> I've tried to use gsn_coordinates on the same plot and that didn't work
> and
> I've tried to create two separate plots with attached data coordinates and
> then use gsn_add_annotation
>
> When I try to do this the script just hangs after creating a graphic of
> the first plot.
>
> NCAR Command Language Version 6.3.0
>
> Thank you.
> Dan Rosen
>
> --
> Dan Rosen
> NESII/CIRES/NOAA
> Email: daniel.rosen at noaa.gov
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170414/6fe89bce/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: datagrid_1.ncl
Type: application/octet-stream
Size: 1973 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170414/6fe89bce/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: datagrid.png
Type: image/png
Size: 520363 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170414/6fe89bce/attachment-0001.png 


More information about the ncl-talk mailing list