[ncl-talk] legend with gsn_add_polymaker

Laura Fowler laura at ucar.edu
Thu Feb 25 09:49:16 MST 2016


Hi:
Can somebody help me figure out how to add markers in a legend along
with the legends with the 3 solid lines. I am attaching the plot so
that you can understand what I am trying to do.

Here is how I create the legend for each plot:

res at pmLegendDisplayMode    = "Always"
res at pmLegendSide           = "Top"
res at pmLegendParallelPosF   =  0.15
res at pmLegendOrthogonalPosF = -0.32
res at pmLegendWidthF         = 0.15
res at pmLegendHeightF        = 0.09
res at lgPerimOn              = False
res at lgLabelFontHeightF     = .015
res at lgItemOrder            = (/2,1,0/)
res at xyExplicitLegendLabels = (/" GF70"," GFNS"," NOGF"/)

Here is the way I added the markers to the bottom plot:

plot(2) = gsn_csm_xy(wks,ispan(1,24,1),data,res)

pmres2 = True
pmres2 at gsMarkerIndex = 16
pmres2 at gsMarkerSizeF = 0.008

obs = new((/9/),typeof(trmm))
obs(8)   = trmm(0)
obs(0:7) = trmm(0:7)

obs_x = (/0,3,6,9,12,15,18,21,24/)
dum = gsn_add_polymarker(wks,plot(2),obs_x,obs,pmres2)

resP = True
resP at gsnPaperWidth  =  8.5
resP at gsnPaperHeight = 11.0
resP at gsnPanelBottom = 0.05
resP at gsnMaximize    = True
gsn_panel(wks,plot,(/3,1/),resP)

For the bottom plot, I would like to have something that add a legend
to the black dots below the legend for NOGF. Is it possible? The
sourcecode can also be found on yellowstone (
/glade/p/work/laura/GFconvection.revised/plots/plots.diurnalcycle.ncl).

Thanks,
Laura











-- 
!-------------------------------------------------------------------------------------------------------------
Laura D. Fowler
Mesoscale and Microscale Meteorology Division (MMM)
National Center for Atmospheric Research
P.O. Box 3000, Boulder CO 80307-3000

e-mail: laura at ucar.edu
phone: 303-497-1628

!-------------------------------------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FIGURE_10.revised.pdf
Type: application/pdf
Size: 84107 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160225/c5fd4f51/attachment.pdf 


More information about the ncl-talk mailing list