[ncl-talk] FW: Legend to draw on top of grid lines

Mary Haley haley at ucar.edu
Wed Feb 22 10:08:56 MST 2017


In order to post a question to ncl-talk, you must first subscribe to it.

Please see this page to subscribe:

http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Once you subscribe, you should receive an automated email right away that
you need to respond to in order for the subscription to go through. If you
don't receive this automated email, then please check your spam box.

Once you respond to the automated email, you should be able to send your
question again to ncl-talk at ucar.edu.

In order to get the leg_10 plot to work in a panel, I would use the
powerful "overlay" call to make one plot a part of the other.  That way,
when you draw the base plot, you will get both plots.

See the (hurriedly) created leg_10.ncl example that now does a panel.  I
didn't have time to come up with "nice" looking dummy Y curves, so I just
changed a few values to get something out quickly.

You may also want to look at the "simple_legend" function which is
mentioned on the same page.  It should be much easier to create a legend
with this function.

--Mary


On Tue, Feb 21, 2017 at 12:41 PM, Matichuk, Rebecca <
Matichuk.Rebecca at epa.gov> wrote:

> Hi,
>
> I received the email below stating that my email to the NCL help emailing
> list has been rejected. I'm not sure why, but would you be able to help me?
>
> Thanks,
> Rebecca
> 303-312-6867
>
> -----Original Message-----
> From: ncl-talk-bounces at ucar.edu [mailto:ncl-talk-bounces at ucar.edu] On
> Behalf Of ncl-talk-owner at ucar.edu
> Sent: Tuesday, February 21, 2017 6:45 AM
> To: Matichuk, Rebecca <Matichuk.Rebecca at epa.gov>
> Subject: Legend to draw on top of grid lines
>
> You are not allowed to post to this mailing list, and your message has
> been automatically rejected.  If you think that your messages are being
> rejected in error, contact the mailing list owner at
> ncl-talk-owner at ucar.edu.
>
> =====================================
>
> Hi,
>
> I'm trying to generate a panel plot where the legends are not transparent
> and on top of grid lines. I found this example at the link included below.
> However, it is for a single figure and I cannot get it to work for the
> panel plotting. By trying to following the NCL example, my legends just
> disappear. What should I alter in this example from the NCL website to get
> it to work for a panel plot that:
> 1.      NCL version: 6.2.1
> 2.      2x3 panel
> 3.      Uses plot(iplot) = gsn_csm_xy(wks1,xplot,yplot,res)
> 4.      Uses gsn_panel(wks1,plot,(/row_plot,col_plot/),resB)
> 5.      GNU/Linux system
>
> https://www.ncl.ucar.edu/Applications/Scripts/leg_10.ncl
>
> Thank you,
> Rebecca
>
>
> ---------- Forwarded message ----------
> From: "Matichuk, Rebecca" <Matichuk.Rebecca at epa.gov>
> To: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
> Cc:
> Date: Tue, 21 Feb 2017 13:45:18 +0000
> Subject: Legend to draw on top of grid lines
>
> Hi,
>
>
>
> I’m trying to generate a panel plot where the legends are not transparent
> and on top of grid lines. I found this example at the link included below.
> However, it is for a single figure and I cannot get it to work for the
> panel plotting. By trying to following the NCL example, my legends just
> disappear. What should I alter in this example from the NCL website to get
> it to work for a panel plot that:
>
> 1.       NCL version: 6.2.1
>
> 2.       2x3 panel
>
> 3.       Uses plot(iplot) = gsn_csm_xy(wks1,xplot,yplot,res)
>
> 4.       Uses gsn_panel(wks1,plot,(/row_plot,col_plot/),resB)
>
> 5.       GNU/Linux system
>
>
>
> https://www.ncl.ucar.edu/Applications/Scripts/leg_10.ncl
>
>
>
> Thank you,
>
> Rebecca
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170222/7c7d5080/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: leg_panel.png
Type: image/png
Size: 124107 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170222/7c7d5080/attachment-0001.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: leg_10_panel.ncl
Type: application/octet-stream
Size: 4481 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170222/7c7d5080/attachment-0001.obj 


More information about the ncl-talk mailing list