- Using the symbol names max and min could cause confusion
with the keywords Ferret already uses for the MAX and MIN
functions and transformations. This does not seem to be the
problem however, it's more a matter of programming style.
- As you are developing a script, use the SHOW SYMBOL,
SHOW VARIABLE and LIST commands to see what values
your definitions are taking on. You can take those commands out
later. Leave off the /QUIET qualifier until later, when your
script
is working. Execute your script line by line so you can look
at the
results of each command before continuing. Taking your commands,
I'll add some suggested commands using capital letters to make them
easier to see.
define symbol var1 $1%AAA% !my variableI do see one thing you need to do differently; define the axmin and
define symbol var2 $2%BBB% !parameter 1 - computed from my variable
define symbol var3 $3%CCC% !parameter 2 - computed from my variableSHOW SYMBOL var1
SHOW SYMBOL var2
SHOW SYMBOL var3let template1=if AAA[l=@max] ge BBB then AAA[l=@max] else BBB
LIST template1define symbol axmax $4%template1%
SHOW SYMBOL axmaxlet template2=if AAA[l=@min] le CCC then AAA[l=@min] else CCC
define symbol axmin $5%template2%
LIST template2
SHOW SYMBOL axminplot/vlim=($min):($max) ($var1)
define symbol axmax $4%`template1`%Otherwise you are just assigning axmax the string
define symbol axmin $5%`template2`%
Hemerson Tonin wrote:
Hi Ferreters--I am trying to design a journal that adjust itself as better as possible to
plot my results.The basic journal compute some parameters (statistical stuff - not showed)
and when I try to plot them, some parameters have not appear due VLIM. In
sum, I have intend to define symbols automatically (inside the journal)
that will give these limits.Below is part of my plot journal sequence.
define symbol var1 $1%AAA% !my variable
define symbol var2 $2%BBB% !parameter 1 - computed from my variable
(result from expression - single value)
define symbol var3 $3%CCC% !parameter 2 - computed from my variable
(result from expression - single value)! AAA[l=@max] may be bigger, equal or smaller than BBB
! AAA[l=@min] may be bigger, equal or smaller than CCC
! BBB is bigger than CCClet/quiet template1=if AAA[l=@max] ge BBB then AAA[l=@max] else BBB;define
symbol max $4%template1%
let/quiet template2=if AAA[l=@min] le CCC then AAA[l=@min] else CCC;define
symbol min $5%template2%! above, only to determine which values are my limits and defining as
symbol (Can I afford to do this ???)
! and thenplot/vlim=($min):($max) ($var1)
plot/ov/colour=red/nolabels ($var2)
plot/ov/colour=red/nolabels ($var3)! The sequence of variable plotted doesn't matter
! The big problem is: ferret cannot understand my symbols "min" and "max".
It has returned a message:!-> plot/vlim=mi:ma AAA
**ERROR: command syntax: miCan anyone help me ???
Tonin, H. E.
School of Chemistry, Physics and Earth Sciences
Flinders University
Adelaide - Australia