[ncl-talk] How to put panels closer in a plot?

Anahita Amiri Farahani aamir003 at ucr.edu
Wed Jul 17 14:20:16 MDT 2019


Hi all,

I have a problem with one f my panel in a plot the Y axis is out. Attached
it the plot and you can see the code for plotting here:


;*********************************************************************************
res2                   = True                       ; plot mods desired
res2 at lbLabelFontHeightF =.022
res2 at gsnStringFontHeightF = 0.025

res2 at gsnDraw = False
res2 at gsnFrame = False
;res2 at tiMainString      = "Vertical profile of atmospheric heating rate"
          ; add title
res2 at tiYAxisString = "Pressure (hPa)"  ; xaxis string
res2 at tiXAxisString = "Atmospheric heating rate (K/day)";Pressure levels
(hPa)"

res2 at gsnXRefLine       = 0.
res2 at gsnXRefLineDashPatterns = 4

res2 at trYMinF     = 100 ; set minimum Y-axis value
res2 at trYMaxF     =  1000 ; set maximum Y-axis value
res2 at trXMinF     = -0.02      ; set minimum X-axis value
;res2 at trXMaxF     = 0.035      ; set maximum X-axis value
 res2 at trYReverse = True                     ; reverse Y-axis
res2 at xyDashPattern  = 0                         ; Make curves all solid



res2 at xyLineThicknesses = (/2.0, 2.0, 2.0/)
res2 at xyLineColors   = (/"blue","red","green"/) ; 3 different colors
; add a legend
 res2 at pmLegendDisplayMode    = "Always"              ; turn on legend

 res2 at pmLegendSide           = "Top"                 ; Change location of
 res2 at pmLegendParallelPosF   = .90                   ; move units right
 res2 at pmLegendOrthogonalPosF = -0.6                  ; more neg = down

 res2 at pmLegendWidthF         = 0.06                  ; Change width and
 res2 at pmLegendHeightF        = 0.25                  ; height of legend.
 res2 at lgLabelFontHeightF     = .015                   ; change font height
 res2 at lgPerimOn              = False                 ; no box around
; labels for the legend
res2 at xyExplicitLegendLabels = (/"Total","Sea","Land"/)
;plot  = gsn_csm_xy (wks,Absp3D_fine_no_ds5,lev3,res) ; create plot



res2 at gsnLeftString       = "                            Global"
plot(2)  = gsn_csm_xy (wks,data1,lev3,res2) ; create plot
;res2 at tmYLLabelsOn   = False    ; no y left tm labels
;res2 at tiYAxisOn      = False    ; no y-axis title
res2 at gsnLeftString       = "                       Africa Region"
plot(3) = gsn_csm_xy (wks,data2,lev3,res2)
;************************************************
; create panel
;************************************************
resP                  = True                    ; modify the panel plot
resP at gsnPanelLabelBar = False                  ; add common colorbar
resP at gsnPanelFigureStrings = (/"a)","b)","c)","d)"/)      ; add strings to
panel
gsn_panel(wks,plot,(/2,2/),resP)


Thanks,
Ana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190717/3004a0ca/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.eps
Type: application/postscript
Size: 1505831 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190717/3004a0ca/attachment-0001.eps>


More information about the ncl-talk mailing list