[ncl-talk] Changing the size of panel plot elements

Toni Klemm toni-klemm at tamu.edu
Fri Oct 25 10:09:30 MDT 2019


Hi Adam,

Thanks a lot, that worked! It didn’t even need adjustment, and the text on the top left and right fits better, too. 

Is there a way to make the top two panels as wide as the other ones? I attached the plot again.

Thank you again!

Toni


Toni Klemm, Ph.D.
Postdoctoral Research Associate
Department of Ecosystem Science and Management
College of Agriculture and Life Sciences
Texas A&M University, College Station, TX
www.toni-klemm.de <http://www.toni-klemm.de/> | @toniklemm <http://www.twitter.com/toniklemm>
Editorial Board member, Early Career Climate Forum <http://www.eccforum.org/>








> On Oct 25, 2019, at 10:52 AM, Adam Phillips <asphilli at ucar.edu> wrote:
> 
> Hi Toni,
> I would call gsn_panel twice, once for the first row and once for the 2nd/3rd rows. You will also have to set a few resources in your panel resource list:
> resP at gsnPanelBottom = 0.65  ; will likely need adjusting
> resP at gsnFrame = False
> resP at gsnPanelRowSpec = False
> resP at gsnPanelLabelBar = False
> resP at gsnPanelDebug = True
> gsn_panel(wks,plot(:1),(/1,2/),resP)
> 
> resP at gsnPanelTop = resP at gsnPanelBottom - 0.05   ; will likely need adjusting
> delete(resP at gsnPanelBottom)
> resP at gsnPanelLabelBar = True
> gsn_panel(wks,plot(2:),(/2,2/),resP)
> frame(wks)
> 
> gsnPanelDebug prints out information about the positioning of the panel plots, as well as their size. You can then use this information to set the positioning of the panels (although you cannot set the height/width this way). See panel example 19:
> http://www.ncl.ucar.edu/Applications/panel.shtml#ex19 <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.ncl.ucar.edu_Applications_panel.shtml-23ex19&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=ms1C-4LCLEKb7ZTZxu3OHEE9X5zMXrM3CM8irEnTEJA&s=EyuWGmkFjAnBXDcAaq1T8M6L8S5n9REldVKmiXrwsjQ&e=>
> This method will take a bit of trial and error, but it shouldn't take too long. 
> 
> Alternatively, you can panel the figures manually, see example 39 here:
> http://www.ncl.ucar.edu/Applications/panel.shtml#ex39 <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.ncl.ucar.edu_Applications_panel.shtml-23ex39&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=ms1C-4LCLEKb7ZTZxu3OHEE9X5zMXrM3CM8irEnTEJA&s=lI7qJiSmhKpg9Lh0AVY8iu-ghtsjLm-yIDZ_8siRp2w&e=>
> Adam
> 
> On Fri, Oct 25, 2019 at 9:29 AM Toni Klemm via ncl-talk <ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>> wrote:
> Hello NCL community,
> 
> I’m plotting a panel of 6 maps (2 columns x 3 rows), each one 5 longitudes wide but the top two panels have a different size than the other ones, because their geographic area is larger (spanning 7 degrees latitude instead of 6 degrees). Because of that, the top panel elements are smaller than the other ones. Is there a way to change the size of the top two so that they all site neatly on top of each other?
> 
> I attached a sample plot and my code.
> 
> Thank you all,
> Toni
> 
> 
> Toni Klemm, Ph.D.
> Postdoctoral Research Associate
> Department of Ecosystem Science and Management
> College of Agriculture and Life Sciences
> Texas A&M University, College Station, TX
> www.toni-klemm.de <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.toni-2Dklemm.de&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=ms1C-4LCLEKb7ZTZxu3OHEE9X5zMXrM3CM8irEnTEJA&s=a28I16hXfGunVsd7pbdWmZ5MnQzE3rvz6gOywuUafqg&e=> | @toniklemm <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.twitter.com_toniklemm&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=ms1C-4LCLEKb7ZTZxu3OHEE9X5zMXrM3CM8irEnTEJA&s=Nq3lxAHg2jAoknVLSDrRd0LT-4p7423El63cgVdIpKE&e=>
> Editorial Board member, Early Career Climate Forum <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.eccforum.org&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=ms1C-4LCLEKb7ZTZxu3OHEE9X5zMXrM3CM8irEnTEJA&s=fd1Z3GwkT_abgEmfcVJDQ0UJFenP90C1WSK3ova6N9I&e=>
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.ucar.edu_mailman_listinfo_ncl-2Dtalk&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=ms1C-4LCLEKb7ZTZxu3OHEE9X5zMXrM3CM8irEnTEJA&s=_6Mu-FAX6TIXr552Rm3G8khUmbo77Zg_QWa7LVOroNk&e=>
> 
> -- 
> Adam Phillips 
> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/ <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.cgd.ucar.edu_staff_asphilli_&d=DwMFaQ&c=u6LDEWzohnDQ01ySGnxMzg&r=zmhRVp0i4wZ5_1Ujh0fnRXAExHgKLTQu0rZLW7PxKA4&m=ms1C-4LCLEKb7ZTZxu3OHEE9X5zMXrM3CM8irEnTEJA&s=xRHoXEvlcX3T-Pf1NJxPrZw32bS_WNqXAUkN_2SrRG0&e=>   303-497-1726 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191025/bdca47a3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NPP_hist_nfs_zone_1-3_w_e_map_high_frequency.png
Type: image/png
Size: 499420 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191025/bdca47a3/attachment-0001.png>


More information about the ncl-talk mailing list