|
From: Teo S B. <teo...@gm...> - 2010-02-13 15:48:23
|
Some test cases:
#testcase: try01
set grid
set key left
set samples 10
set title "try01: parameter definition both in front and trailing"
plot [0:1] [-1:10] k=0, \
k*x t '0x' w lp lt 3, k=k+1, \
k*x t '1x' w lp lt 4, k=k+1, \
k*x t '2x' w lp lt 5, k=k+1
pause -1 "Continue?"
print "k=3?", " k=", k
#testcase: try02
set grid
set key left
set samples 10
set title "try02: parameter definiton, notice recalculation on zoom/replot"
k=0
plot [0:1] [-1:10] \
k*x t '0x' w lp lt 3, k=k+1, \
k*x t '1x' w lp lt 4, k=k+1, \
k*x t '2x' w lp lt 5, k=k+1
pause -1 "Continue?"
print "k=", k
#testcase: try03
set grid
set title "try03: parameter and function definitions, notice enhanced labels"
plot [-10:10] [-200:200] k=10, k*x , \
a=10,b=2,f(x)=a*b*x, f(x)
pause -1 "Continue?"
print "k=", k, " a=", a, " b=",b
#testcase: try04
set grid
set title "try04: mix of parameter definiton and iteration"
plot [-10:10] [-30:30] a=3, a*x, for [k=1:2] k*x
pause -1 "Continue?"
print "a=", a
exit
#testcase: try05 (causes unresponsive gnuplot)
set grid
set title "try05: infinite loop?"
plot [-10:10] [-30:30] a=3, a*x, a=7, for [k=1:2] k*x
pause -1 "Continue?"
print "a=", a
|