Can I put a legend on top of grid lines?

From: Arne Melsom <arne.melsom_at_nyahnyahspammersnyahnyah>
Date: Mon May 27 2013 - 05:47:26 MDT

Hi!
I'd like to draw a label inside a figure, on top of grid lines. Is this possible? If so, how do I change the script below? I'm using v. 6.1.0.
Thanks!
Arne M.

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

begin

pi = 4.*atan(1.)
x = fspan(-pi,pi,100)
y = sin(x)

wks = gsn_open_wks ("x11","samplePlot")

res = True

res@tmXMajorGrid = True
res@tmYMajorGrid = True

res@xyExplicitLabels = " y=sin(x)"

res@lgLabelFontHeightF = 0.02
res@lgPerimFill = "SolidFill"
res@lgPerimFillColor = "cyan"

res@pmLegendDisplayMode = "Always"
res@pmLegendOrthogonalPosF =-0.85
res@pmLegendParallelPosF = 0.25
res@pmLegendWidthF = 0.1
res@pmLegendHeightF = 0.05

plot = gsn_csm_xy(wks,x,y,res)

end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon May 27 05:47:38 2013

This archive was generated by hypermail 2.1.8 : Thu May 30 2013 - 11:38:10 MDT