> Thank you for your attention!
> I using :
> 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"
> I get a colorbar for temperature from
> but I want change it to
> I try this :
> cmap = RGBtoCmap("/home/ncl/rgb_files/diag16.rgb")
> vars = (/"diff2"/)
> nvars = dimsizes(vars)
> cntrs = new ((/nvars,15/),float)
> 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!
By default, when you use the "gsn_csm_vector_scalar_map_ce" function,
the scalar field is used to color the vectors by, *not* to draw a
separate contour plot.
If you want the scalar field to be drawn as a separate contour plot,
then set the special resource "gsnScalarContour" to True:
vcres@gsnScalarContour = True
Your "cn" resources should now be recognized by the function.
For more information, please see the first example at:
ncl-talk mailing list
ncl-talk AT ucar.edu
This archive was generated by hypermail 2b29 : Sat Oct 16 2004 - 10:17:31 MDT