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

Karin Meier-Fleischer meier-fleischer at dkrz.de
Tue Aug 29 01:34:34 MDT 2017


Hi Dale,

have a look at panel example 21 
http://ncl.ucar.edu/Applications/Scripts/panel_21.ncl

The resource pmLabelBarOrthogonalPosF is what you are looking for. 
Setting e.g.

   res at pmLabelBarOrthogonalPosF = -0.016

will move the labelbar upward.

-Karin

Am 29.08.17 um 00:26 schrieb dale zuri:
> 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
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
Dipl. Geophys. Karin Meier-Fleischer
Visualization, NCL, CDO
Application Support

Deutsches Klimarechenzentrum GmbH (DKRZ)
Bundesstrasse 45a - D20146 Hamburg - Germany

Phone:    +49 (0)40 460094 126
Fax:      +49 (0)40 460094 270
E-Mail:   meier-fleischer at dkrz.de
URL:      www.dkrz.de

Geschäftsführer: Prof. Dr. Thomas Ludwig
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg HRB 39784

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170829/ff89b49a/attachment.html>


More information about the ncl-talk mailing list