;================================================ ; lb_3.ncl ;================================================ ; ; Concepts illustrated: ; - Changing the labelbar labels ; - Changing the angle of labelbar labels ; - Adding a title to a labelbar ; - Changing the font size of the labelbar's labels ; - Moving the labelbar away from the plot ; ;================================================ load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ;************************************************ begin ;************************************************ ; openi netCDF file and read in data ;************************************************ in = addfile("atmos.nc","r") v = in->V ;************************************************ ; create plot ;************************************************ wks = gsn_open_wks("ps","lb") ; open a ncgm file gsn_define_colormap(wks, "wgne15") res = True res@cnFillOn = True ; turn on color res@lbLabelAngleF = 45 ; angle labels res@lbLabelFontHeightF =.022 ; make labels larger res@lbTitleOn = True ; turn on title res@lbTitleString = "Default position for label bar title" res@lbTitleFontHeightF= .015 ; make title smaller res@pmLabelBarOrthogonalPosF = .10 ; move whole thing down contour = gsn_csm_contour_map_ce(wks,v(0,3,:,:),res) ; create the plot end