Hi -
You need to tell Ferret to evaluate the variable MONTH at each time
step. It's looking to the command parser just like any string. What
you would need in the label is something that would do this,
`Month[l=`currTime`]`
But we can't have grave accents inside grave accents. So make an
intermediate variable, and evaluate that in the LABEL command.
repeat/range=1:`nos`/name=lg (;\
set view v`lg`;
contour/line/fill/lev=($t_levels)/k=1/L=`currTime`/nokey/nolab
temp; go fland;\
let mlab = Month[L=`currTime`];
label/nouser `($ppl$xlen)/2`,
`($ppl$ylen)-0.2`,0,0,0.16,`mlab`;\
-Ansley
On 7/10/2012 11:03 AM, Sudev Das M P
wrote:
Dear All,
I have a script meant for generating multiple sub-plots in a
single window using the "repeat" command. In that script, I face
problem in writing labels inside each subplot.
I would like to write the month name inside each subplot starting
from March (i.e. "(a) MAR, (b) APR,.......(l) FEB.)
Please see my script below.
======================================================================================
I am defining the label number and month name in the following
way:
LET lab=
TSEQUENCE({"a","b","c","d","e","f","g","h","i","j","k","l"})
LET Month =TSEQUENCE({"JAN", "FEB", "MAR", "APR", "MAY", "JUN",
"JUL", "AUG", "SEP", "OCT", "NOV", "DEC"})
Here I am defining a variable "StrtTim" so that I can start the
subplot with any desired month.
LET StrtTim=3 !
Here I am assigning the value of "StrtTim" to another variable
"currTime", with which the loop is running. The
value of the variable "currTime" is changed using an IF condition
statement at the end of the loop after plotting
each subplot.
LET nos=12
LET currTime=StrtTim
repeat/range=1:`nos`/name=lg (;\
set view v`lg`;
contour/line/fill/lev=($t_levels)/k=1/L=`currTime`/nokey/nolab
temp; go fland;\
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
label/nouser `($ppl$xlen)/2`,
`($ppl$ylen)-0.2`,0,0,0.16,Month[l=`currTime`];\
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
=======================================================================================
When I run this script, in each subplot instead of getting the
month name as MAR, APR, etc. I am getting the labels as: "Month
l=3", "Month l=4",etc..
Please give me some suggestions on what mistake I am making
in my scripting. I also like to know how can I concatenate the
label and month name
so that in the subplot the label will be (a) MAR, (b) APR
etc..
Hope to get a reply soon.
Thanks,
Sudev
|