how to change the colorbar scale in Vectors colored by a scalar map?

From: liping deng (lipingdengff AT yahoo.com)
Date: Fri Oct 15 2004 - 16:11:33 MDT


hello!

Thank you for your attention!

I using :

gsn_define_colormap(wks,"BlAqGrYeOrReVi200")
vcres@gsnSpreadColors = True ; use full colormap
vcres@gsnSpreadColorEnd = 193 ; last color to use
vcres@gsnSpreadColorStart = 6 ; first color to use
i = NhlNewColor(wks,0.7,0.7,0.7)
vcres@vcGlyphStyle = "CurlyVector"
                            
plot(0)=gsn_csm_vector_scalar_map_ce(wks,diff2(5,:,:),diff3(5,:,:),diff1(5,:,:),vcres)

I get a colorbar for temperature from
-1.6,-1.4,-1.2,-1.0,-0.8,-0.6,-0.4,-0.2,0,0.2,0.4,0.6,0.8,1,1.2,1.4

but I want change it to
-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.2,0,0.2,0.4,0.6,0.8,1,1.2,1.4

I try this :
cmap = RGBtoCmap("/home/ncl/rgb_files/diag16.rgb")
gsn_define_colormap(wks,cmap)
vars = (/"diff2"/)
nvars = dimsizes(vars)
cntrs = new ((/nvars,15/),float)
cntrs(0,:)=(/-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.2,0,0.2,0.4,0.6,0.8,1,1.2,1.4/)

vcres@cnLevelSelectionMode="ExplicitLevels"
vcres@cnLevels = cntrs(0,:)

but do not work, I got an answer is
 warning:cnLevels is not a valid resource in
/DJFcmtctldiff79-98TUV850hPa_vector at this time
warning:cnLevelSelectionMode is not a valid resource
in /DJFcmtctldiff79-98TUV850hPa_vector at this time

So do any suggestion can give me to change the the
colorbar ?

Thank you very much!

Best wishes!
liping

                
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Sat Oct 16 2004 - 10:17:39 MDT