[ncl-talk] panel_33.ncl

Mary Haley haley at ucar.edu
Sat Nov 17 13:58:40 MST 2018


Hi Laura,

Try this script. I cleaned up the logic of the panelling to base the size
of the difference plots on the area used for the top set of plots.

I included a subset of the data file so you can run the modified script.

I'll include this on the panel page later. I'll also clean up the
panel_33.ncl to be more user friendly to modify.

--Mary


On Sat, Nov 17, 2018 at 4:29 AM Rashed Mahmood <rashidcomsis at gmail.com>
wrote:

> I think the first issue is related to setting the bottom limit for the
> first set of plots:
>
>     resP at gsnPanelBottom    = 0.33              ; or something similar
>
> The second issue is likely related to maximize_output(wks,True) that would try to use maximum available space. May be you can try commenting this.
>
> Cheers,
>
> Rashed
>
>
>
>
>
> On Fri, Nov 16, 2018 at 1:16 PM Laura Fowler <laura at ucar.edu> wrote:
>
>> Hello:
>>
>> I am trying to produce a panel plot that looks like panel_33.ncl but
>> instead of having 2 rows for the actual fields, I have 3 rows, and instead
>> of having 1 row for the difference fields, I have 2 rows. I have two
>> issues: The first issue is that I am running out of room on the page to
>> plot the last 2 rows and I do not know what to do next? The second issue
>> that the top 3 rows are plotted in a landscape mode although I set:
>>
>> resP at gsnPaperOrientation = "portrait"
>>
>>
>>
>> Here is the script that I used after I created my 10 individual plots:
>>
>>
>> ;--- create panel plot:
>>
>> resP = True
>>
>> resP at gsnDraw             = False
>>
>> resP at gsnFrame            = False
>>
>> resP at gsnPanelLabelBar    = True
>>
>> resP at gsnPaperOrientation = "portrait"
>>
>>
>> resP at lbOrientation      = "vertical"
>>
>> resP at lbLabelFontHeightF = 0.01
>>
>> ;resP at pmLabelBarWidthF  = 0.075
>>
>> ;resP at pmLabelBarHeightF = 0.40
>>
>>
>>
>> panelid1 = gsn_panel_return(wks,plots(0:5),(/3,2/),resP)
>>
>> bb = NhlGetBB(panelid1)
>>
>> top    = max(bb(:,0))
>>
>> bottom = min(bb(:,1))
>>
>> height = (top-bottom)/3.
>>
>> print("--- top    = "+top)
>>
>> print("--- bottom = "+bottom)
>>
>> print("--- height = "+height)
>>
>> print(" ")
>>
>>
>> ;resP at gsnPanelTop   = bottom-0.01    ; lower 1/3 plus some white space
>>
>> resP at gsnPanelTop    = bottom
>>
>> resP at gsnPanelBottom = resP at gsnPanelTop - height
>>
>> print("--- gsnPanelTop = "+resP at gsnPanelTop)
>>
>> print("--- gsnPanelBot = "+resP at gsnPanelBottom)
>>
>>
>> ;panelid2 = gsn_panel_return(wks,plots(6:9),(/2,2/),resP)
>>
>> maximize_output(wks,True)
>>
>>
>> ;resP at gsnDraw             = True
>>
>> ;resP at gsnFrame            = False
>>
>> ;gsn_panel(wks,plots(0:5),(/3,2/),resP)
>>
>> ;frame(wks)
>>
>>
>>
>> When print gsnPanelTop and gsnPanelBottom, I get:
>>
>>
>> (0) --- end create individual plot:
>>
>> (0)
>>
>> (0) --- top    = 0.889811
>>
>> (0) --- bottom = 0.110189
>>
>> (0) --- height = 0.259874
>>
>> (0)
>>
>> (0) --- gsnPanelTop = 0.110189
>>
>> (0) --- gsnPanelBot = -0.149686
>>
>>
>>
>> I am lost as what to do next. Help and suggestions would be greatly
>> appreciated.
>>
>>
>>
>> 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
>>
>>
>> !-------------------------------------------------------------------------------------------------------------
>> _______________________________________________
>> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181117/9df6bd42/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: panel_33_mod.ncl
Type: application/octet-stream
Size: 6314 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181117/9df6bd42/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: panel.png
Type: image/png
Size: 366262 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181117/9df6bd42/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: panel_data.nc
Type: application/octet-stream
Size: 790224 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181117/9df6bd42/attachment-0003.obj>


More information about the ncl-talk mailing list