summaryrefslogtreecommitdiff
path: root/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-11 04:51:21 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-11 04:51:21 +0000
commit3514110b89bee5c37e308b4ca887e66dfe841456 (patch)
treed280d8542cc44d1cd1a75e8ec87b1f9d231561b7 /ext/tk/sample/tkextlib/tcllib/plotdemos2.rb
parent05f5928c9d0f094d1e7e21a9bd9d8a8fc2f1a805 (diff)
* ext/tk/lib/tk/*: untabify
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/tkextlib/tcllib/plotdemos2.rb')
-rw-r--r--ext/tk/sample/tkextlib/tcllib/plotdemos2.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb b/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb
index 3fd57f3804..33a6f29940 100644
--- a/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb
+++ b/ext/tk/sample/tkextlib/tcllib/plotdemos2.rb
@@ -13,21 +13,21 @@ Tk.pack(c1,c2, :fill=>:both, :side=>:top)
# Set up a strip chart
###############################
slipchart = Tk::Tcllib::Plotchart::Stripchart.new(c1, [0.0, 100.0, 10.0],
- [0.0, 100.0, 20.0])
+ [0.0, 100.0, 20.0])
TkTimer.new(500, -1, proc{|obj| # obj --> TkTimer object
- slipchart, xold, xd, yold, yd = obj.return_value
- xnew = xold + xd
- ynew = yold + (rand() - 0.5) * yd
- ynew2 = yold + (rand() - 0.5) * 2.0 * yd
- slipchart.plot('series1', xnew, ynew)
- slipchart.plot('series2', xnew, ynew2)
- obj.stop if xnew >= 200
- [slipchart, xnew, xd, ynew, yd] # return_value
- }).start(100, proc{
- # init return_value
- [slipchart, 0.0, 15.0, 50.0, 30.0]
- })
+ slipchart, xold, xd, yold, yd = obj.return_value
+ xnew = xold + xd
+ ynew = yold + (rand() - 0.5) * yd
+ ynew2 = yold + (rand() - 0.5) * 2.0 * yd
+ slipchart.plot('series1', xnew, ynew)
+ slipchart.plot('series2', xnew, ynew2)
+ obj.stop if xnew >= 200
+ [slipchart, xnew, xd, ynew, yd] # return_value
+ }).start(100, proc{
+ # init return_value
+ [slipchart, 0.0, 15.0, 50.0, 30.0]
+ })
slipchart.title "Aha!"
@@ -35,7 +35,7 @@ slipchart.title "Aha!"
# Set up an isometric plot
###############################
s = Tk::Tcllib::Plotchart::IsometricPlot.new(c2, [0.0, 100.0], [0.0, 200.0],
- :noaxes)
+ :noaxes)
s.set_zoom_pan
@@ -51,7 +51,7 @@ h = TkToplevel.new(:title=>'h')
c = TkCanvas.new(h, :bg=>'white', :width=>400, :height=>200).pack(:fill=>:both)
s = Tk::Tcllib::Plotchart::XYPlot.new(c, [0.0, 100.0, 10.0],
- [0.0, 100.0, 20.0])
+ [0.0, 100.0, 20.0])
s.dataconfig('series1', :colour=>'red', :type=>:symbol)
s.dataconfig('series2', :colour=>'green', :type=>:both)