>
> 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
Dear Liping,
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:
http://www.cgd.ucar.edu/csm/support/CSM_Graphics/vector.shtml
--Mary
_______________________________________________
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