[ncl-talk] labelbar titles for vertical plots
Dennis Shea
shea at ucar.edu
Thu Aug 7 16:38:29 MDT 2014
How about
https://www.ncl.ucar.edu/Applications/unique.shtml
Example 8 uses
res at lbOrientation = "Vertical"
res at lbTitleString = "Sea Surface Temperature (deg C)" ; bar title
res at lbTitlePosition = "Right" ; title location
res at lbTitleDirection = "Across" ; letter angle
res at lbTitleAngleF = 90. ; title angle
res at lbTitleFontHeightF = 0.02 ; font height
Does that do?
D
On Thu, Aug 7, 2014 at 4:11 PM, Cathy Smith (NOAA Affiliate) <
cathy.smith at noaa.gov> wrote:
> 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
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140807/8e38e5db/attachment.html
More information about the ncl-talk
mailing list