Re: How do I overlap legend over plot border

From: Xin Xi <xxi_at_nyahnyahspammersnyahnyah>
Date: Tue Jun 11 2013 - 13:36:55 MDT

Thanks, Mary. I do understand the draw order issue here. I used a
panel_plot, which makes it more complicated. For less pain, I will try to
adjust the legend font and position to keep it within plot box.

On Tue, Jun 11, 2013 at 2:54 PM, Mary Haley <haley@ucar.edu> wrote:

> Please look at lg_10.ncl again. This example explains that you have to
> draw the plot twice in order to get the legend to cover up the grid lines.
> I think you are having the same issue with the tickmarks.
>
> The tick marks always want to be drawn last, and we don't appear to have a
> "DrawOrder" resource to specify them to get drawn in an earlier phase.
>
> Using lg_10.ncl as a guide, you will have to draw the plot once with the
> tick marks and legend turned on. Then draw the plot again with the
> tickmarks turned off (res@gsnTickMarksOn = False) but the legend still
> on. This way you get tickmarks, but the legend will be drawn on top of them.
>
> We already have a trouble-ticket for this very issue (NCL-148), so I'll be
> sure to add your email to it.
>
> --Mary
>
> On Jun 11, 2013, at 12:38 PM, Xin Xi wrote:
>
> > Hi Mary,
> > I did look at the examples, but the lgPerimFill does not work on the
> plot border. I have attached my figure.
> >
> > The related part of res is:
> >
> > resxy@pmLegendDisplayMode = "Always"
> > resxy@pmLegendSide = "Top"
> > resxy@pmLegendOrthogonalPosF = -0.3
> > resxy@pmLegendParallelPosF = .37
> > resxy@pmLegendWidthF = 0.06
> > resxy@pmLegendHeightF = 0.1
> > resxy@lgLabelFontHeightF = .01
> > resxy@lgPerimOn = True
> > resxy@lgPerimFill = "Solid" ; or "SolidFill", neither
> works.
> > resxy@lgPerimFillColor = "yellow"
> > resxy@xyExplicitLegendLabels = (/"a","b","c","d","e"/)
> >
> >
> >
> >
> > On Tue, Jun 11, 2013 at 1:55 PM, Mary Haley <haley@ucar.edu> wrote:
> > Did you look at example lg_10.ncl at:
> >
> > http://www.ncl.ucar.edu/Applications/legend.shtml
> >
> > This talks about using lgPerimFill and lgPerimFillColor.
> >
> > If you are trying these resources and it still doesn't work, then please
> provide your script and data, if possible, so we can take a look. You can
> use our ftp site to upload the files:
> >
> > http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP
> >
> > --Mary
> >
> >
> > On Jun 11, 2013, at 10:37 AM, Xin Xi wrote:
> >
> > >
> > > Hi How can I make the legend appear above the plot border? Even if I
> set lgPerim to solidfill, it is still transparent to the plot box. Pls see
> attached example. Thanks.
> > > Xin
> > > <BoxPlot.png>_______________________________________________
> > > ncl-talk mailing list
> > > List instructions, subscriber options, unsubscribe:
> > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> >
> >
> >
> > --
> > Xin Xi
> > School of Earth and Atmospheric Sciences
> > Georgia Institute of Technology
> > 311 Ferst Drive, Atlanta, GA 30332-0340
> > <fig.png>_______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

-- 
*Xin Xi
School of Earth and Atmospheric Sciences
Georgia Institute of Technology
311 Ferst Drive, Atlanta, GA 30332-0340*

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jun 11 13:37:15 2013

This archive was generated by hypermail 2.1.8 : Mon Jun 24 2013 - 11:46:47 MDT