[ncl-talk] Forgot to post script - Panelling & plot sizes

Adam Phillips asphilli at ucar.edu
Fri Oct 21 13:22:20 MDT 2016


Hi Juris,
A good debugging process to use on this situation is to simplify your
resource list, identify the source of the issue, and then add resources
back in. In this case, I would start by simplifying your panel resource
list, specifically your res_bar list. I would start with removing the
following resources:
res_bar at pmLabelBarHeightF = 0.20
res_bar at gsnPanelScalePlotIndex = 2

The first of those resources is setting the label bar height to be 20% of
the height of the page which is likely too big. (panel_33 uses vertical
label bars thus a setting of .20 would be appropriate in that case.) The
second resource is telling NCL to use the size of the 2nd plot as the
proper size, but the resource (like-ncl) is zero-based and you only have
plot_bar(0) and plot_bar(1).

Finally, I would also alter this resource setting:
res_contour at gsnPanelBottom = 0.25
to something like this:
res_contour at gsnPanelBottom = 0.35

as I believe the label bar does not count as part of the panel boundary,
and thus drops below your original setting of 0.25.

Hope that helps. If not, please respond back to the ncl-talk email list.
Adam



On Fri, Oct 21, 2016 at 11:40 AM, Juris Almonte <Juris.Almonte at umanitoba.ca>
wrote:

> Hi NCL users,
>
> I would like the plots within my panel to be of the same size, at least in
> the x axis, as they have the same dimensions on the x axis and differ on
> the y axis.
>
> Here is the part of the script which panelled the plots.
>
> res_contour = True
> res_contour at gsnPanelBottom = 0.25
> res_contour at gsnFrame = False
> res_contour at gsnDraw = False
> res_contour at gsnPanelLabelBar = True
>
> panelid1 = gsn_panel_return(wks,plot_contour,(/3,2/),res_contour)
>
> ;---Calculate location for top of difference plots
> bb     = NhlGetBB(panelid1)
> bottom = min(bb(:,1))
> top    = max(bb(:,0))
> height = (top-bottom)/3.     ; Height of one row
>
> ;---Panel the diff plots at the bottom
> res_bar = True
> res_bar at gsnPanelTop       = bottom-0.01    ; lower 1/4 plus some white
> space
> ;res_bar at gsnPanelBottom    = res_bar at gsnPanelTop - height
> res_bar at pmLabelBarHeightF = 0.20
> res_bar at gsnFrame = False
> res_bar at gsnDraw = False
> res_bar at gsnPanelScalePlotIndex = 2
> panelid2 = gsn_panel_return(wks,plot_bar,(/1,2/),res_bar)
>
> maximize_output(wks,True)
>
> I used example panel_33.ncl for reference, using gsn_panel_return.
>
> Thanks in advance,
>
> Juris
> M.Sc. student
> University of Manitoba
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>


-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161021/d49abfc0/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RainMixingRatio_Jan_11_18UTC.png
Type: image/png
Size: 182944 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161021/d49abfc0/attachment.png 


More information about the ncl-talk mailing list