Hi Soumik,
You are almost there. In order to use maximize_output with paneled
plots, you have to make sure the paneled plots don't get resized
back to their original sizes after being paneled. The
"gsn_panel_return" function is what you can use.
I created an example that is similar in shape to what you are doing.
See example panel_33.ncl at:
http://www.ncl.ucar.edu/Applications/panel.shtml#ex33
I hope to clean things up in the future so you don't need to use
this unadvertised function.
The paneling part of your code will look something like this:
;---Resources for paneling
pres = True ; modify the panel plot
pres@gsnFrame = False ; don't advance frame yet
pres@gsnDraw = False ; draw later, in maximize mode
pres@gsnPanelBottom = 0.33 ; top 2/3 of frame
pres@gsnPanelLabelBar = True ; add common colorbar
pres@lbOrientation = "vertical"
pres@pmLabelBarWidthF = 0.075 ; make thinner
pres@pmLabelBarHeightF = 0.40
;---Panel first group of plots (nothing is drawn yet)
panelid1 = gsn_panel_return(wks,plots,(/2,nyears/),pres)
;---Calculate location for top of difference plots
bb = NhlGetBB(panelid1)
bottom = min(bb(:,1))
top = max(bb(:,0))
height = (top-bottom)/2. ; Height of one row
;---Panel the diff plots at the bottom 1/3 of the frame
pres@gsnPanelTop = bottom-0.01 ; lower 1/3 plus some white space
pres@gsnPanelBottom = pres@gsnPanelTop - height
pres@pmLabelBarHeightF = 0.20 ; Make height smaller
panelid2 = gsn_panel_return(wks,diff_plots,(/1,2/),pres)
;---This will maximize the size of all the paneled stuff.
maximize_output(wks,True)
--Mary
On Jul 31, 2013, at 11:30 AM, Soumik Basu wrote:
> Hi Adam,
>
> From the example it is not clear to me that where should I put that
> maximize statement. I tried putting it in each set of the figures that I
> am drawing but it made the figure split into three separate png figures.
> Most probably because it is closing the frame when I am calling the
> maximize function. So if I try putting it at the end after drawing both
> sets separately and call this function before closing the frame it is
> still splitting the image in two separate png figures. So I tried using
> this function after closing the frame after the second set of plots and
> then it give the smaller images as before and another figure with the
> second sets of plots only.
>
> Thanks,
> Soumik
>
> --
> "Numbing the pain for a while will make it worse when you finally feel
> it.
> ~J.K. Rowling"
> *****************************************
> Soumik Basu
> Graduate Student, Research Assistant
> International Arctic Research Center
> University of Alaska Fairbanks
> Fairbanks,Alaska,USA
> *****************************************
>
> On 2013-07-31 09:10, Adam Phillips wrote:
>> Hi Soumik,
>> Try using maximize_output:
>> http://www.ncl.ucar.edu/Document/Graphics/Interfaces/maximize_output.shtml
>> [3]
>> An example of using the procedure can be found in example 20 here:
>> http://www.ncl.ucar.edu/Applications/panel.shtml#ex20 [4]
>> Adam
>>
>> On 07/31/2013 10:56 AM, Soumik Basu wrote:
>>
>> Hi,
>>
>> Thank you very much for your reply.
>> Yes I tried all these already. I am drawing first four panels first and
>> then the next two. I am attaching the code where you can see the
>> resources that I have already used.
>>
>> Thanks,
>> Soumik
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk [1]
>>
>> --
>> ______________________________________________________________
>> Adam Phillips asphilli@ucar.edu
>> NCAR/Climate and Global Dynamics Division (303) 497-1726
>> P.O. Box 3000
>> Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli [2]
>>
>>
>>
>> Links:
>> ------
>> [1] http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>> [2] http://www.cgd.ucar.edu/cas/asphilli
>> [3]
>> http://www.ncl.ucar.edu/Document/Graphics/Interfaces/maximize_output.shtml
>> [4] http://www.ncl.ucar.edu/Applications/panel.shtml#ex20
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 31 13:41:01 2013
This archive was generated by hypermail 2.1.8 : Thu Aug 01 2013 - 15:55:04 MDT