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

Rashed Mahmood rashidcomsis at gmail.com
Thu Jul 18 00:45:50 MDT 2019


I did not see any problem with your xy plots. May be you are talking about
top tick marks. You can set the top tick marks off by adding the following
to your resources:
res2 at tmXTOn = False

Does this solve the issue?

Cheers,
Rashed

On Wed, Jul 17, 2019 at 10:20 PM Anahita Amiri Farahani via ncl-talk <
ncl-talk at ucar.edu> wrote:

> 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
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20190718/2b992c85/attachment.html>


More information about the ncl-talk mailing list