summaryrefslogtreecommitdiffstats
path: root/tests/base.tcl
diff options
context:
space:
mode:
authorjoye <joye>2014-02-20 20:00:22 (GMT)
committerjoye <joye>2014-02-20 20:00:22 (GMT)
commitfd0b5e8aa99e737f5b5df3d66c7dd9c5a2b87f92 (patch)
treefbdee6db6563be069057ed9c2d095def80cffb5f /tests/base.tcl
parent508a9e0b677a779027b9462ce593c08c3adca434 (diff)
downloadblt-fd0b5e8aa99e737f5b5df3d66c7dd9c5a2b87f92.zip
blt-fd0b5e8aa99e737f5b5df3d66c7dd9c5a2b87f92.tar.gz
blt-fd0b5e8aa99e737f5b5df3d66c7dd9c5a2b87f92.tar.bz2
*** empty log message ***
Diffstat (limited to 'tests/base.tcl')
-rw-r--r--tests/base.tcl38
1 files changed, 15 insertions, 23 deletions
diff --git a/tests/base.tcl b/tests/base.tcl
index 6c50063..d69e609 100644
--- a/tests/base.tcl
+++ b/tests/base.tcl
@@ -63,6 +63,19 @@ proc bltCmd {graph args} {
after $sleep
}
+proc bltElements {graph} {
+ $graph element create data1 \
+ -xdata { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 } \
+ -ydata { 13 25 36 46 55 64 70 75 80 90}\
+ -color blue
+ $graph element create data2 \
+ -xdata { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 } \
+ -ydata { 26 50 72 92 110 128 140 150 160 180}\
+ -yerror {10 10 10 10 10 10 10 10 10 10 10} \
+ -color red
+ $graph legend configure -title "Legend"
+}
+
proc bltBarGraph {w} {
global sleep
@@ -76,20 +89,10 @@ proc bltBarGraph {w} {
-barmode aligned \
]
pack $graph -expand yes -fill both
-
- $graph element create data1 \
- -xdata { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 } \
- -ydata { 13 25 36 46 55 64 70 75 80 90}\
- -color blue
- $graph element create data2 \
- -xdata { 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 } \
- -ydata { 26 50 72 92 110 128 140 150 160 180}\
- -color red
- $graph legend configure -title "Legend"
+ bltElements $graph
update
after $sleep
-
return $graph
}
@@ -104,20 +107,9 @@ proc bltLineGraph {w} {
-title $title \
]
pack $graph -expand yes -fill both
-
- $graph element create data1 \
- -xdata {0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0} \
- -ydata {13 25 36 46 55 64 70 75 80 90} \
- -color blue
- $graph element create data2 \
- -xdata {0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0} \
- -ydata {26 50 72 92 110 128 140 150 160 180} \
- -yerror {10 10 10 10 10 10 10 10 10 10 10} \
- -color red
- $graph legend configure -title "Legend"
+ bltElements $graph
update
after $sleep
-
return $graph
}