diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-11 04:51:21 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-11 04:51:21 +0000 |
commit | 3514110b89bee5c37e308b4ca887e66dfe841456 (patch) | |
tree | d280d8542cc44d1cd1a75e8ec87b1f9d231561b7 /ext/tk/sample/tkextlib/tcllib/plotdemos3.rb | |
parent | 05f5928c9d0f094d1e7e21a9bd9d8a8fc2f1a805 (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/plotdemos3.rb')
-rw-r--r-- | ext/tk/sample/tkextlib/tcllib/plotdemos3.rb | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb b/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb index 3b74b1f592..2b5c7642bb 100644 --- a/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb +++ b/ext/tk/sample/tkextlib/tcllib/plotdemos3.rb @@ -8,9 +8,9 @@ require 'tkextlib/tcllib/plotchart' ############################### Tk::Tcllib::Plotchart::Stripchart.new([0.0, 100.0, 10.0], - [0.0, 100.0, 20.0], - :background=>'white', - :width=>400, :height=>200){|chart| + [0.0, 100.0, 20.0], + :background=>'white', + :width=>400, :height=>200){|chart| title "Aha!" pack(:fill=>:both, :side=>:top) @@ -21,26 +21,26 @@ Tk::Tcllib::Plotchart::Stripchart.new([0.0, 100.0, 10.0], yd = 30.0 TkTimer.new(500, -1, proc{|obj| # obj --> TkTimer object - xold, yold = obj.return_value - xnew = xold + xd - ynew = yold + (rand() - 0.5) * yd - ynew2 = yold + (rand() - 0.5) * 2.0 * yd + xold, yold = obj.return_value + xnew = xold + xd + ynew = yold + (rand() - 0.5) * yd + ynew2 = yold + (rand() - 0.5) * 2.0 * yd - series1.plot(xnew, ynew) - series2.plot(xnew, ynew2) + series1.plot(xnew, ynew) + series2.plot(xnew, ynew2) - obj.stop if xnew >= 200 + obj.stop if xnew >= 200 - [xnew, ynew] # return_value - }).start(100, proc{ [0.0, 50.0] }) # init return_value + [xnew, ynew] # return_value + }).start(100, proc{ [0.0, 50.0] }) # init return_value } ############################### # Set up an isometric plot ############################### Tk::Tcllib::Plotchart::IsometricPlot.new([0.0, 100.0], [0.0, 200.0], :noaxes, - :background=>'white', - :width=>400, :height=>200){|chart| + :background=>'white', + :width=>400, :height=>200){|chart| pack(:fill=>:both, :side=>:top) set_zoom_pan @@ -55,17 +55,17 @@ Tk::Tcllib::Plotchart::IsometricPlot.new([0.0, 100.0], [0.0, 200.0], :noaxes, ############################### TkToplevel.new(:title=>'h'){|h| Tk::Tcllib::Plotchart::XYPlot.new(h, [0.0, 100.0, 10.0], - [0.0, 100.0, 20.0], - :bg=>'white', - :width=>400, :height=>200){|chart| + [0.0, 100.0, 20.0], + :bg=>'white', + :width=>400, :height=>200){|chart| pack(:fill=>:both) yconfig(:format=>"%12.2e") series1 = Tk::Tcllib::Plotchart::PlotSeries.new(chart, :colour=>'red', - :type=>:symbol) + :type=>:symbol) series2 = Tk::Tcllib::Plotchart::PlotSeries.new(chart, :colour=>'green', - :type=>:both) + :type=>:both) x = 5.0 %w(plus cross circle up down dot upfilled downfilled).each{|sym| |