[Thread Prev][Thread Next][Index]

Re: [ferret_users] Help needed for creating multiple subplots using loop



Dear Paulo & Otacilio,

Thank you very much for both of your reply.

 Otacilio, when I tried to use your script "multi_view_demo.jnl" for creating multiple view ports, I am getting the following error message.
--------------------------------------------------------------------------------------------------
go small_view 10,6,0.12,0.11,0.008,0.08,0.1,0.006, VS
**TMAP ERR: non-existent or not on line
small_view (.jnl)
go small_view 10,6,0.12,0.11,0.008,0.08,0.1,0.006, VS
Command file, command group, or REPEAT execution aborted
---------------------------------------------------------------------------------------------------
I would highly appreciate if you could tell me what should I do to fix the above error message. Do I need to have any other supporting files to run your script? If so, from where can I get those files?

Please give me a reply.

Thanks,
Sudev

On Thu, Jul 5, 2012 at 10:21 PM, Otacilio Leandro <otaciliomneto@xxxxxxxxx> wrote:
Hi Sudev,

There's a script called multi_view.jnl (attached just in case) that make the viewport definitions automatic.

On my script i've made one matrix 5x5.

It requires to set view like VS11, VS12, VS13, .... , VSab.

To do that i first define the indices 

let indice_a = {1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5}
let indice_b = {1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5}

and inside the loop, i done:

let a = indice_a[i=`m`] ;\
let b = indice_b[i=`m`] ;\

set view VS`a``b` ;

fill ....

I'm sending as attached the script, the figure it made and the multi_view script.

Hope it helps


2012/7/4 Sudev Das M P <devdas.pnr@xxxxxxxxx>
Dear All,

I need some help to create multiple sub-plots in a single page.
I have a netcdf file containing 12 months ocean temperature data. My
objective is to get 12 sub-plots of all the 12 months in a single
page.

a) After loading the data file,I defined the X and Y limits of the
required 12 sub-plots in the following way.
 !*******************************************************************************
! Defining the x & y limits of view ports for 12 subplots.
!*******************************************************************************
define view/axes/xlimits=0.06,0.34/ylimits=0.765,.965 v11
define view/axes/xlimits=0.37,0.65/ylimits=0.765,.965 v12
define view/axes/xlimits=0.68,0.96/ylimits=0.765,.965 v13
define view/axes/xlimits=0.06,0.34/ylimits=0.535,.735 v21
define view/axes/xlimits=0.37,0.65/ylimits=0.535,.735 v22
define view/axes/xlimits=0.68,0.96/ylimits=0.535,.735 v23
define view/axes/xlimits=0.06,0.34/ylimits=0.305,.505 v31
define view/axes/xlimits=0.37,0.65/ylimits=0.305,.505 v32
define view/axes/xlimits=0.68,0.96/ylimits=0.305,.505 v33
define view/axes/xlimits=0.06,0.34/ylimits=0.075,.275 v41
define view/axes/xlimits=0.37,0.65/ylimits=0.075,.275 v42
define view/axes/xlimits=0.68,0.96/ylimits=0.075,.275 v43

b) After that the 12 sub-plots are created in the following way.

set view v11; contour/line/fill/lev=($t_levels)/k=1/L=1/nokey/nolab temp
set view v12; contour/line/fill/lev=($t_levels)/k=1/L=2/nokey/nolab temp

etc.....

set view v43; contour/line/fill/lev=($t_levels)/k=1/L=12/nokey/nolab temp

c) Right now, in my script, for each sub-plot I am defining the view
port separately through v11 to v43 (i.e.12 times as shown above) and
also for getting each subplot the same command line is repeated (12
times) just by changing the time axis L from 1 to 12.
By doing this way, obviously the script is very lengthy. I would like
to know any simple way of defining the view port and then getting the
plot through Ferret looping command. I am not familiar with any such
command. Hence if anybody knows a better way, please help me with
this.

Thanks,
Sudev.



--
Otacilio Leandro de Menezes Neto
Instituto Nacional de Pesquisas Espaciais
Doutorando em Meteorologia
Contato: (12) 3186-9537 / (12) 8194-1455
Email alternativo: otacilio.neto@xxxxxxxxxxxxx



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement