Re: why I have no degree sign?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Feb 12 2014 - 09:34:52 MST

Try setting:

vcres@pmTickMarkDisplayMode = "Always"

FYI: this kind of question is the kind that can get answered by going to our "tips" page:

http://www.ncl.ucar.edu/Applications/concepts_list.shtml

and searching for the word "degree".

--Mary

On Feb 11, 2014, at 5:42 PM, 朱学明 <557xiaozhu@163.com> wrote:

> Hello everyone,
> Anybody can help to take a check why my picture have no the degree sign(°) in the X/Y axis's labels? I have tried to use gsn_csm_vector_scalar_map_ce or gsn_csm_vector_scalar_map.
> My code is as follow,
>
> ;************************************************
> ; create plot
> ;************************************************
> wks_type = "png"
> wks_type@wkWidth = 2500
> wks_type@wkHeight = 2500
>
> vcres = True ; plot mods desired
>
> vcres@gsnMaximize = True ; maximize plot in frame
>
> vcres@gsnScalarContour = True ; False ;
> vcres@gsnSpreadColors = True ; use full colormap
> vcres@gsnSpreadColorStart = 6 ; first color to use
> vcres@gsnSpreadColorEnd = 193 ; last color to use
>
> vcres@vcRefMagnitudeF = 0.5 ; make vectors larger
> vcres@vcRefLengthF = 0.020 ; ref vec length
> vcres@vcRefAnnoOrthogonalPosF = -0.99 ; move reference vector into plot
> vcres@vcRefAnnoParallelPosF = 0.11 ; move reference vector horizontal
> vcres@vcRefAnnoPerimOn = False ; don't draw an outline around the perimeter of the box
>
> vcres@vcMinFracLengthF = 0.0 ; length of min vector as fraction of reference vector.
> vcres@vcMinDistanceF = 0.015 ; thin out vectors
>
> vcres@vcLineArrowThicknessF = 4.0
> vcres@vcLineArrowHeadMaxSizeF = 0.003
> vcres@vcMonoLineArrowColor = False ; color arrows based on magnitude
>
> vcres@vcLevelSelectionMode = "Manuallevels"
> vcres@vcMinLevelValF = 0
> vcres@vcMaxLevelValF = 1
> vcres@vcLevelSpacingF = 0.1 ; contour spacing
>
> vcres@lbLabelStride = 1 ; plot every other colar bar label
> vcres@lbOrientation = "Vertical"
> vcres@lbBottomMarginF = 0.0
> vcres@lbTopMarginF = 0.0
> vcres@lbLeftMarginF = 0.0
> vcres@lbLabelFontHeightF = 0.005
> ; vcres@lbLabelPosition = "Left"
> vcres@pmLabelBarParallelPosF= 0.5 ;0.1
>
> vcres@pmLabelBarOrthogonalPosF = 0.0
> vcres@pmLabelBarWidthF = 0.05
>
> if(vcres@gsnScalarContour) then
> vcres@cnFillOn = True
> vcres@cnLinesOn = False
> vcres@cnLineLabelsOn = False
>
> vcres@cnLevelSelectionMode = "Manuallevels"
> vcres@cnMinLevelValF = 0
> vcres@cnMaxLevelValF = 1
> vcres@cnLevelSpacingF = 0.1 ; contour spacing
>
> vcres@vcMonoLineArrowColor = True ; color arrows based on magnitude
> end if
>
>
> vcres@tiMainOn = False
> vcres@tmXBLabelsOn = True
> vcres@tmEqualizeXYSizes = True
>
> vcres@gsnMajorLonSpacing = 20
> vcres@gsnMajorLatSpacing = 10
> vcres@gsnMinorLatSpacing = 5
>
> vcres@tmXBMajorLengthF = 0.008
> vcres@tmXBMinorLengthF = 0.004
> vcres@tmXBLabelFontHeightF = 0.008
> vcres@tmXBMajorOutwardLengthF = 0.0
> vcres@tmXBMinorOutwardLengthF = 0.0
>
> vcres@tmYLMajorLengthF = 0.008
> vcres@tmYLLabelFontHeightF = 0.008
> vcres@tmYLMajorOutwardLengthF = 0.0
> vcres@tmYLMinorOutwardLengthF = 0.0
>
> vcres@vcGlyphStyle = "CurlyVector" ; turn on curly vectors
>
> ;---Set to False if regional data or setting vfXArray/vfYArray
> vcres@gsnAddCyclic = False
>
> ; note that the gsn_csm_*map_ce templates automatically set
> ; res@mpLimitMode="LatLon" for you. If you are plotting a different projection,
> ; you may have to set this resource.
>
> vcres@mpDataBaseVersion = "HighRes" ;"MediumRes" ;"MediumRes"
> ; vcres@mpLimitMode = "LatLon"
> vcres@mpMinLatF = lat_min ; range to zoom in on
> vcres@mpMaxLatF = lat_max
> vcres@mpMinLonF = lon_min
> vcres@mpMaxLonF = lon_max
> vcres@mpCenterLonF = (lon_min+lon_max)/2.0
>
> nn = dimsizes(in[:]->ocean_time)
> if(ne .eq. -1) then
> ne=nn
> end if
> u =new(dimsizes(h),typeof(h))
> v =new(dimsizes(h),typeof(h))
> do nt=nb,ne
> time=in[:] ->ocean_time(nt-1)
> time@calendar = "360_day"
> utc_date = cd_calendar(time, -3)
> print(""+utc_date)
>
> ;************************************************
> ; read in zonal [u] and meridional [v] winds
> ;************************************************
> speed = sqrt(u^2 + v^2)
> u!0 = "lat"
> u!1 = "lon"
> u&lat = lat
> u&lon = lon
> v!0 = "lat"
> v!1 = "lon"
> v&lat = lat
> v&lon = lon
> speed!0 = "lat"
> speed!1 = "lon"
> speed&lat = lat
> speed&lon = lon
> filename="velocity_"+flt2string(depth)+"layer-"+utc_date
> wks = gsn_open_wks(wks_type ,filename) ; open a ps file
> gsn_define_colormap(wks,"rainbow") ;"BlAqGrYeOrRe") ; choose colormap
> ; plot = gsn_csm_contour_map_ce(wks,speed, res)
>
> plot = gsn_csm_vector_scalar_map_ce(wks,u,v,speed,vcres) ; create plot
> ; plot = gsn_csm_vector_map_ce(wks,u,v,vcres)
> end do
> Thanks for your help.
>
> 2014-02-12
> Xueming Zhu 朱学明
> Key Laboratory of Research on Marine Hazards Forecasting (LoMF), SOA
> National Marine Environmental Forecasting Center (NMEFC)
> No.8, Dahuisi Road, Haidian District, Beijing, 100081
> People's Republic of China
> Tel:+86-10-82481923
> <velocity1_20m-1990121512.png>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Feb 12 09:35:09 2014

This archive was generated by hypermail 2.1.8 : Wed Feb 12 2014 - 09:35:52 MST