[ncl-talk] Sub: space between label bar and plot..

dale zuri dalezuri at gmail.com
Mon Aug 28 16:26:12 MDT 2017


Hi NCL user,
Could someone help me to reduce the space between label bar and figure.? I
have attached here a copy of the figure.

Thanks
Dz
gsn_define_colormap(wks,""+col+"")
 plot = new(1,graphic)
   res                       = True
res at gsnDraw             = False
   res at gsnMaximize           = True             ; make large
   res at gsnFrame           =  False            ; make large
   res at cnFillOn              = True             ; turn on color
   res at cnLinesOn             = False            ; turn off contour lines
   res at cnLineLabelsOn        = False            ; turn off contour line
labels
   res at cnInfoLabelOn       = False
res at lbLabelBarOn        = False           ; turn off individual cb's

res at gsnTickMarksOn = False
res at mpGridAndLimbOn       = False

   res at cnLevelSelectionMode  = "ManualLevels"   ; set manual contour levels
   res at cnMinLevelValF        =  -10            ; set min contour level
   res at cnMaxLevelValF        =   20            ; set max contour level
   res at cnLevelSpacingF       =   5          ; set contour interval
   res at gsnAddCyclic          =  False
   res at mpFillOn              = False            ; turn off default
background gray
 res at mpLimitMode         = "Corners"

  res at mpRelativeCenterLon = True

  res at mpCenterLonF        = -152.2044

  res at mpRelativeCenterLat = True

  res at mpCenterLatF        = 90.

  res at mpRightCornerLonF   = -103.99817

  res at mpRightCornerLatF   = 67.58854

;  res at mpLeftCornerLonF    = -181.7859
  res at mpLeftCornerLonF    = -159.0859

  res at mpLeftCornerLatF    = 43.23277
res at mpGeophysicalLineThicknessF = 3.0
res at mpGeophysicalLineColor = "Black"; (/22/)
;res at mpNationalLineThicknessF  = 3.0
res at mpOutlineBoundarySets = "GeophysicalAndUSStates" ; add state boundaries
res at mpNationalLineColor  = res at mpGeophysicalLineColor
res at mpUSStateLineThicknessF = 3.0
res at mpUSStateLineColor  = res at mpGeophysicalLineColor
res at gsnStringFont   = "helvetica-bold"
; res at gsnCenterString       = year(0)+"-"+year(nyrs-1)
  res at gsnLeftString   = ""               ; add the gsn titles
  res at gsnRightString  = ""
;   res at tiMainString          = "Trend, Reanalysis-2m
Temperature(~S~o~N~C)"    ; fili
;res at tiMainFontHeightF  = 0.02
res at gsnCenterStringFontHeightF     = 0.020
res at gsnCenterString     = "NMME-CFSv2-Clim-"+mon+""+yr+""
;---Names of shapefiles
;---Add shapefile outlines
  lnres        = True
  lnres at minlat = 43.23277
  lnres at maxlat = 67.58854
  lnres at minlon = -181.7859
  lnres at maxlon = -103.99817
lnres at gsLineThicknessF = 2.0
  file_tl = "predictive_service_areas.shp"
plot = gsn_csm_contour_map_ce(wks,zAvg,res)
 dum_tl       = gsn_add_shapefile_polylines(wks,plot,file_tl,lnres)
;************************************************
; create panel
;************************************************
  resP                  = True                   ; modify the panel plot
  resP at gsnPanelLabelBar = True
  resP at lbLabelFontHeightF = 0.020                ; set font height of Label
Bar labels
 resP at gsnPanelBottom   = 0.2                    ; shrink panel plot by
setting bottom edge of plot
 resP at gsnPanelTop      = 0.9                    ; shrink panel plot by
setting top edge of plot
 resP at pmLabelBarWidthF  = 0.55                 ; make thinner
;  resP at pmLabelBarHeightF = 0.05
 resP at pmLabelBarHeightF = 0.1
 resP at gsnPanelYWhiteSpacePercent = 5.           ; increase spacing along
Y-axis between panel plots
 resP at cnLinesOn       = False                   ; turn off contour lines
;  resP at lbTitleString    = "2m-temperature(~S~o~N~C)"
  resP at lbTitleString    = ""+unit+""
  resP at lbLabelFont    = "helvetica-bold"          ; add common colorbar
  resP at lbTitleFont    = "helvetica-bold"          ; add common colorbar
  resP at lbTitleFontHeightF= .025                 ; make title smaller
   resP at cnLineLabelsOn  = False

  resP at txFontHeightF   = 0.03
  resP at txFont   = "helvetica-bold"
  ;resP at txString   = ""+Ind+"-"+Initial+""
  gsn_panel(wks,plot,(/1,1/),resP)               ; now draw as one pl
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170828/9bf4a4b4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ERA-PSAPrecip-Aug-(1982-2010).pdf
Type: application/pdf
Size: 696984 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170828/9bf4a4b4/attachment-0001.pdf>


More information about the ncl-talk mailing list