Hi,
I am trying to add a legend to a plot. Below is the ncl script just
for this legend part. I am attaching a ps file created by it.
I have put lgBoxLinesOn = True so that it shows how much white space it
puts each side of the actual legends.
I would like this white space to be very small and the text to be
bigger. The actual line segments could be shorter but that does not seem
to be settable.
Any advice would be gladly received
Rosemarie
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
ncolors = 9
cmap = new((/ncolors,3/), float)
cmap = (/ (/1.0,1.0,1.0/), \
(/0.0,0.0,0.0/), \
(/1.0,0.0,0.0/), \
(/0.0,1.0,0.0/), \
(/0.0,0.0,1.0/), \
(/0.0,1.0,1.0/), \
(/1.0,0.0,0.80/), \
(/1.0,0.50,0.0/), \
(/0.90,0.90,0.90/)/)
xworkid = gsn_open_wks("ps","Vtst")
setvalues xworkid
"wkColorMap" : cmap
end setvalues
getvalues xworkid
"wkDefGraphicStyleId": gsid
end getvalues
Lg_id = create "Legend" legendClass xworkid
"vpXF" : 0.3
"vpYF" : 0.5
"vpWidthF" : 0.70
"vpHeightF" : 0.18
"lgItemCount" : 3
; "lgPerimOn" : False
"lgBoxLinesOn" : True
"lgLeftMarginF" : 0.01
"lgRightMarginF" : 0.01
"lgLabelsOn" : False
"lgLabelFont" : 30
"lgLabelFontHeightF" : .07
"lgLabelStrings" : (/" D:F35:)):F30: Models"," VM5a"," VM2"/)
"lgDashIndexes" : (/16,0,0/)
"lgMonoLineThickness" : False
"lgLineThicknesses" : (/3.,6.,6./)
"lgLineColors" : (/4,3,2/)
; "lgMonoLabelFontColor" : False invalid
; "lgLabelFontColors" : (/4,3,2/) invalid
"lgMonoLineLabelFontHeight" : False
"lgLineLabelFontHeights" : (/0.02,0.02,0.02/)
"lgLineLabelFontThicknessF" : 3
"lgLineLabelFontColors" : (/4,3,2/)
"lgLineLabelStrings" : (/"VM5b-#","VM5a ","VM2 "/)
"lgLineLabelFont" : 30
end create
draw(Lg_id)
end
-- Dr Rosemarie Drummond rmarie_at_atmosp.physics.utoronto.ca
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.2.0 : Fri Nov 14 2008 - 16:42:12 MST