[ncl-talk] labelbar titles for vertical plots

Cathy Smith (NOAA Affiliate) cathy.smith at noaa.gov
Thu Aug 7 16:11:19 MDT 2014


NCLers
I'm trying to have my title for a labelbar that is vertical plot
"sideways". Currently, the title plots in the right location but the
each letter is rotated 270 degrees. Can it be done using the default
labelbar routine? Someone showed me a NCL plot that did this but didn't
have the code.  I didn't see an example (so far) on the NCL example
page. I tried adding

 res at lbTitleAngleF=90 and  res at lbTitleAngleF=270 but neither seemed to
rotate the letters.

The code to display the issue below is slightly modified from

lb_2.ncl

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"  
;************************************************
begin

  in = addfile("/Datasets/ncep.reanalysis/pressure/vwnd.2014.nc","r")
  v  = in->vwnd(0,0,:,:)


  wks = gsn_open_wks("ps","lb")          ; open a ncgm file
  gsn_define_colormap(wks, "wgne15")

  res               =   True
  res at cnFillOn      =   True                ; turn on color
  res at lbOrientation =   "vertical"          ; vertical label bar
  res at lbAutoManage= "True"
  res at lbLabelStrings =  (/"-70","-50","-30","-10","10","30","50","70",\
    "90","110","180","190","400","500","600","700"/)
  res at lbTitleString="Title of labelbar"
  res at lbTitleDirection="Down"
  res at lbTitlePosition = "Left"
  contour = gsn_csm_contour_map_ce(wks,v(:,:),res)  ; create the plot
end

Thanks
Cathy

-- 
----------------------------------------------
NOAA/ESRL PSD and CU CIRES
303-497-6263
http://www.esrl.noaa.gov/psd/people/cathy.smith/

Emails about data/webpages may get quicker responses from emailing 
esrl.psd.data at noaa.gov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.png
Type: image/png
Size: 185229 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140807/e06283bb/attachment.png 


More information about the ncl-talk mailing list