[ncl-talk] panel_33.ncl
Laura Fowler
laura at ucar.edu
Tue Nov 20 06:46:42 MST 2018
Hi Mary:
Many thanks for taking the time to rework the script. Using
panel_33_mod.ncl, I was able to modify my script to produce the plot I
needed (see attached totPREC.png and test.ncl in
/gpfs/fs1/scratch/laura/MPASprojects2018/MPAS.cu_shallow/novemberPUBLICATION/precipitation_figs).
I need a little more work to align DEC 2015 and JUN 2016 to their
respective columns).
I further modified test.ncl (test2.ncl in the same directory) to remove one
row from the top panel so that I can have 2 panels of two rows with one
color bar for each panel. I do not understand the logic on how to modify
res at gsnPanelBottom to make this work on a more systematic basic. It seems
like there is a lot of "guessing" in doing this?
Thanks,
Laura
On Sat, Nov 17, 2018 at 1:59 PM Mary Haley <haley at ucar.edu> wrote:
> 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
>>
>
--
!-------------------------------------------------------------------------------------------------------------
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/20181120/13b1a34d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: totPREC.png
Type: image/png
Size: 492516 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181120/13b1a34d/attachment-0001.png>
More information about the ncl-talk
mailing list