<div dir="ltr"><div>Did you read the gsn_panel documentation? <br><br><a href="https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_panel.shtml">https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_panel.shtml</a><br>
<br></div>In particular, <br><br><pre>        procedure gsn_panel (
                wks : graphic,
                plots [*] : graphic,
                dims [*] : integer,
                res [1] : logical
        )
<br><em>dims</em>
An array of integers indicating the configuration of the plots on the
frame. <em>dims</em> can either be two integers representing the
number of rows and columns of the paneled lots ....<br>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br></pre><pre>Think<br></pre><pre> dims = (/nrow,ncol/) <br><br>====<br><br>So, all you need is<br><br> pres = True<br>
pres@gsnMaximize = True<br><br>Then<br><br> gsn_panel(wks,plot,(/3,4/),pres) ; 3 rows; each row having 4 plots<br></pre><pre>or<br><br> gsn_panel(wks,plot,(/4,3/),pres) ; 4 rows; each row having 3 plots<br></pre><div dir="ltr">
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 6, 2014 at 5:45 PM, Ipshita Majhi <span dir="ltr"><<a href="mailto:ipmajhi@alaska.edu" target="_blank">ipmajhi@alaska.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>I am trying to plot 12 plots in one panel. Each column with 4 plots and three columns like that. Here is the code, I would be grateful if you could tell me where the error is. Thanking you in advance<br>
===========================================<br>; To plot decadal plots<br>; ===========================================<br>;<br>; Concepts illustrated:<br>; - Specifying how many plots to draw in each row<br>; - Left-justifying and centering paneled plots<br>
;<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br><br>begin<br><br> ;=============================================<br>; data processing<br>
;=============================================<br> x=asciiread("~/Documents/PhD_June_2015/NCL_Moonsoon/Data_output/all_month_decade",(/13,12/), "float")<br> year_decadal=ispan(1880,2012,10)<br>;==============================================<br>
; create plot<br>;=============================================<br> <br><br> wks = gsn_open_wks ("ps", "panel" ) <br> plot = new ( 12 , graphic)<br><br><br> hres = True<br> hres@gsnDraw = False<br>
hres@gsnFrame = False<br><br> hres@tiMainString = "Decadal Mean"<br><br> hres@cnLevelSelectionMode = "ManualLevels" ; manual levels<br> hres@cnMinLevelValF = -10.<br>
hres@cnMaxLevelValF = 10.<br> hres@cnLevelSpacingF = 2. <br><br>;==============================================<br>; create panel<br>;=============================================<br> pres = True<br>
pres@gsnPanelRowSpec = True ; tell panel what order to plt<br> gsn_panel(wks,plot,(/4,4,4/),pres)<br><br> pres@gsnPanelCenter = False<br> gsn_panel(wks,plot,(/4,4,4/),pres)<br>end<br></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>