[ncl-talk] how to reduce white space

Mary Haley haley at ucar.edu
Mon Oct 8 14:13:28 MDT 2018


It's kind of complicate how the maximization works.

What's happening in the case of the two sets of panels, is each set of
plots is being maximized to the area you've specified with gsnPanelRight
and gsnPanelLeft.  The setting of 0.1 and 0.5 for the leftmost plots puts
the plots almost right up against the leftmost edge, and ditto for the
right most plots which are up against the rightmost edge and thus there's
not much room for the plots to be maximized before they would run into each
other. The maximization operates on the plots in such a way they maintain
their position relative to the Right and Left settings.

To give the plots a little more room to maximize, you can slightly decrease
the gsnLeft setting for the left plots, and the gsnRightSettings for the
right plots:

  resL at gsnPanelLeft     = 0.09 ; 0.08

  resL at gsnPanelRight    = 0.5
. . .
  resR at gsnPanelLeft     = 0.5
  resR at gsnPanelRight    = 0.91 ; 0.92


On Mon, Oct 8, 2018 at 10:50 AM, Laura Fowler <laura at ucar.edu> wrote:

> Hi Mary:
>
> Many thanks for replying to my question. Adding the two lines that you
> suggested did help reduce the amount of white space between the two columns
> (see panel5.png). This is what I was aiming for. However, I am intrigued
> with the following.
>
> When creating panel5.png (so far without a label bar at the bottom of each
> column), we get panel5.png by calling gsn_panel twice as below:
>
> gsn_panel(wks,plot_A,(/4,1/),resL)
> gsn_panel(wks,plot_B,(/4,1/),resR)
> frame(wks)
>
> Now if I use:
>
> ;panel plots:
>
> resP                  = True
>
> resP at gsnMaximize      = True
>
> resP at gsnDraw          = True
>
> resP at gsnFrame         = False
>
> resP at gsnPanelLabelBar = False
>
>
> gsn_panel(wks,plots,(/4,2/),resP)
> frame(wks)
>
> then I get panel6.png. I was wondering why panel6.png is so much bigger
> than panel5.png when all the resources used to create the eight individual
> plots are exactly the same between the two ncl scripts? Is there a way to
> mimic the size of panel6.png when using the two columns method? I did use
> resL at gsnMaximize = True
> and resR at gsnMaximize = True.
>
> Thanks,
> Laura
>
>
>
> On Fri, Oct 5, 2018 at 3:16 PM Mary Haley <haley at ucar.edu> wrote:
>
>> I'll add another suggestion:
>>
>> You are creating two separate panel plots.  Each one is being centered in
>> its own space, which causes the gap between the two sets.
>>
>> I don't think there's a way to say "right justify the left plots and left
>> justify the right plots", but you can scootch the plots over by also
>> setting the left side of the left plots, and the right side of the right
>> plots, giving them a smaller area to render to.
>>
>> For example:
>>
>> resL                  = True
>>
>> resL at gsnMaximize      = True
>> resL at gsnDraw          = True
>> resL at gsnFrame         = False
>> *resL at gsnPanelLeft     = 0.1*
>> resL at gsnPanelRight    = 0.5
>> resL at gsnPaperOrientation = "portrait"
>>
>> resR                  = True
>> resR at gsnMaximize      = True
>> resR at gsnDraw          = True
>> resR at gsnFrame         = False
>> resR at gsnPanelLeft     = 0.5
>> *resR at gsnPanelRight    = 0.9*
>> resR at gsnPaperOrientation = "portrait"
>>
>>
>>
>> On Fri, Oct 5, 2018 at 1:32 PM, Dennis Shea <shea at ucar.edu> wrote:
>>
>>>
>>> *gsn_attach_plot*
>>> *gsnPanel{X/Y}WhiteSpacePercent*
>>> etc
>>>
>>> At the top of the Applications page or specific example page, the
>>> following appears:
>>>
>>> List of tips <https://www.ncl.ucar.edu/Applications/concepts_list.shtml>,
>>> resources <https://www.ncl.ucar.edu/Applications/res_list.shtml>,
>>> functions/procedures
>>> <https://www.ncl.ucar.edu/Applications/func_list.shtml> and the example
>>> scripts they appear in.
>>> Example pages containing: tips
>>> <https://www.ncl.ucar.edu/Applications/concepts_list.shtml> | resources
>>> <https://www.ncl.ucar.edu/Applications/res_list.shtml> |
>>> functions/procedures
>>> <https://www.ncl.ucar.edu/Applications/func_list.shtml>
>>>
>>> These can be very useful. For example:
>>>
>>> To see all example scripts and figures where (say) the function  *gsn_attach_plot
>>> *is used click on the  *functions/procedures* link and enter:
>>> *gsn_attach_plot*
>>> ---
>>> To see all example scripts and figures where (say) the resource *gsnPanelYWhiteSpacePercent
>>> *is used click on the *resources*  link and enter
>>> * gsnPanelYWhiteSpacePercent *
>>>
>>> *---*
>>>
>>>
>>>
>>> On Fri, Oct 5, 2018 at 1:09 PM Guilherme Martins <jgmsantos at gmail.com>
>>> wrote:
>>>
>>>> Try use
>>>>
>>>>  resP                 = True
>>>>  resP at gsnPanelYWhiteSpacePercent = 5
>>>>  resP at gsnPanelXWhiteSpacePercent = 5
>>>>  gsn_panel(wks,plot,(/2,2/),resP)
>>>>
>>>>
>>>> Em sex, 5 de out de 2018 16:02, Buzan, Jonathan <jbuzan at purdue.edu>
>>>> escreveu:
>>>>
>>>>> Hello Laura,
>>>>>
>>>>> I think you want to use gsn_attach_plot.  Or something like that.
>>>>>
>>>>> -Jonathan
>>>>>
>>>>> On Oct 5, 2018, at 11:57, Laura Fowler <laura at ucar.edu> wrote:
>>>>>
>>>>> Hello:
>>>>>
>>>>> I am really struggling trying to reduce the amount of white space
>>>>> between the two columns so that the individual plots are bigger. I followed
>>>>> panel_12.ncl since I would like to later add a label bar at the bottom of
>>>>> each column. To create the left and right columns, I used:
>>>>>
>>>>> resL                  = True
>>>>>
>>>>> resL at gsnMaximize      = True
>>>>>
>>>>> resL at gsnDraw          = True
>>>>>
>>>>> resL at gsnFrame         = False
>>>>>
>>>>> resL at gsnPanelRight    = 0.5
>>>>>
>>>>> resL at gsnPanelLabelBar = False
>>>>>
>>>>> resL at gsnPaperOrientation = "portrait"
>>>>>
>>>>>
>>>>> resR                  = True
>>>>>
>>>>> resR at gsnMaximize      = True
>>>>>
>>>>> resR at gsnDraw          = True
>>>>>
>>>>> resR at gsnFrame         = False
>>>>>
>>>>> resR at gsnPanelLeft     = 0.5
>>>>>
>>>>> resR at gsnPanelLabelBar = False
>>>>>
>>>>> resR at gsnPaperOrientation = "portrait"
>>>>>
>>>>>
>>>>> gsn_panel(wks,plot_A,(/4,1/),resL)
>>>>>
>>>>> gsn_panel(wks,plot_B,(/4,1/),resR)
>>>>>
>>>>> frame(wks)
>>>>>
>>>>> Using gsnMaximize does not help. Varying resL at gsnPanelRight or
>>>>> resR at gsnPanelLeft to a greater number increases the size of one
>>>>> column at the expense of the other so it looks like we always have to use
>>>>> 0.5 then?
>>>>>
>>>>> Can somebody give a hint?
>>>>> Thanks,
>>>>> Laura
>>>>>
>>>>>
>>>>> --
>>>>> !-----------------------------------------------------------
>>>>> --------------------------------------------------
>>>>> Laura D. Fowler
>>>>>
>>>>> Mesoscale and Microscale Meteorology Division (MMM)
>>>>> National Center for Atmospheric Research
>>>>> P.O. Box 3000, Boulder CO 80307-3000
>>>>>
>>>>> e-mail: laura at ucar.edu
>>>>> phone: 303-497-1628
>>>>>
>>>>> !-----------------------------------------------------------
>>>>> --------------------------------------------------
>>>>>
>>>>> <panel5.png>
>>>>>
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> ncl-talk at ucar.edu
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> ncl-talk at ucar.edu
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>
> --
> !-----------------------------------------------------------
> --------------------------------------------------
> Laura D. Fowler
>
> Mesoscale and Microscale Meteorology Division (MMM)
> National Center for Atmospheric Research
> P.O. Box 3000, Boulder CO 80307-3000
>
> e-mail: laura at ucar.edu
> phone: 303-497-1628
>
> !-----------------------------------------------------------
> --------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181008/9a0fb130/attachment.html>


More information about the ncl-talk mailing list