color spread in gsn_labelbar_ndc

From: Matt Fearon (matthew.fearon AT XXXXXX)
Date: Thu May 22 2003 - 05:34:29 MDT


Dear NCL users:

I am trying to add a labelbar to a plot. I can do this.
However, I would like to use gsnSpreadColors. I
can't seem to get this work. I attached my script and
and a .txt file that contains the set of colors that define
my color map.Your suggestions would be greatly appreciated.
Thank you,
Matt

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

begin

 plot=new(4,graphic)

 wks_type = "eps"
 wks_type@wkOrientation = "portrait"
 wks = gsn_open_wks (wks_type, "test")
 cmap = RGBtoCmap("test.rgb") ;("$HOME/bin/Ncl/greyscale.rgb") ; greyscale
 gsn_define_colormap(wks,cmap)

 lblabels=(/"0","500","1000","1500","2000","2500","3000"/)
 lbres = True
 lbres@lbAutoManage = False
 lbres@lbLabelFontHeightF = 0.019
 lbres@lbOrientation = "Horizontal"
 lbres@vpXF = 0.14
 lbres@vpYF = 0.2
 lbres@vpHeightF = .17
 lbres@vpWidthF = .6
 lbres@lbPerimOn = False
 lbres@lbMonoFillPattern = True
 lbres@gsnSpreadColors = True
 lbres@gsnSpreadColorStart = 34 ; b/w
 lbres@gsnSpreadColorEnd = 3

 gsn_labelbar_ndc(wks,7,lblabels,0.3,0.05,lbres)

end

255 255 255
0 0 0
7.96875 7.96875 7.96875
15.9375 15.9375 15.9375
23.90625 23.90625 23.90625
31.875 31.875 31.875
39.84375 39.84375 39.84375
47.8125 47.8125 47.8125
55.78125 55.78125 55.78125
63.75 63.75 63.75
71.71875 71.71875 71.71875
79.6875 79.6875 79.6875
87.65625 87.65625 87.65625
95.625 95.625 95.625
103.59375 103.59375 103.59375
111.5625 111.5625 111.5625
119.53125 119.53125 119.53125
127.5 127.5 127.5
135.46875 135.46875 135.46875
143.4375 143.4375 143.4375
151.40625 151.40625 151.40625
159.375 159.375 159.375
167.34375 167.34375 167.34375
175.3125 175.3125 175.3125
183.28125 183.28125 183.28125
191.25 191.25 191.25
199.21875 199.21875 199.21875
207.1875 207.1875 207.1875
215.15625 215.15625 215.15625
223.125 223.125 223.125
231.09375 231.09375 231.09375
239.0625 239.0625 239.0625
247.03125 247.03125 247.03125
255 255 255

_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Thu May 22 2003 - 08:06:55 MDT