diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-06 03:56:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-06 03:56:38 +0000 |
commit | 287a34ae0dfc23e4158f67cb7783d239f202c368 (patch) | |
tree | 5e35d5b41aae961b37cf6632f60c42f51c7aa775 /ext/tk/sample/tkextlib/tcllib/plotdemos1.rb | |
parent | 9b52ae2e6491bb5d6c59e1799449f6268baf6f89 (diff) | |
download | ruby-287a34ae0dfc23e4158f67cb7783d239f202c368.tar.gz |
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/tkextlib/tcllib/plotdemos1.rb')
-rw-r--r-- | ext/tk/sample/tkextlib/tcllib/plotdemos1.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb b/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb index 053b0de085..7f35a3833c 100644 --- a/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb +++ b/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb @@ -23,7 +23,7 @@ Tk.pack(vc1,vc2,vc3, :fill=>:both, :side=>:top) ############################### -s = Tk::Tcllib::Plotchart::XYPlot.new(c1, [0.0, 100.0, 10.0], +s = Tk::Tcllib::Plotchart::XYPlot.new(c1, [0.0, 100.0, 10.0], [0.0, 100.0, 20.0]) @@ -56,7 +56,7 @@ s.save_plot "aha.ps" s = Tk::Tcllib::Plotchart::Piechart.new(c2) -s.plot([ ["Long names", 10], ["Short names", 30], +s.plot([ ["Long names", 10], ["Short names", 30], ["Average", 40], ["Ultra-short names", 5] ]) # @@ -78,7 +78,7 @@ s.title "Cardioid" ############################### -s = Tk::Tcllib::Plotchart::Barchart.new(hc1, %w(A B C D E), +s = Tk::Tcllib::Plotchart::Barchart.new(hc1, %w(A B C D E), [0.0, 10.0, 2.0], 2) s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red') @@ -87,7 +87,7 @@ s.title "Arbitrary data" ############################### -s = Tk::Tcllib::Plotchart::Barchart.new(hc2, %w(A B C D E), +s = Tk::Tcllib::Plotchart::Barchart.new(hc2, %w(A B C D E), [0.0, 20.0, 5.0], :stacked) s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red') @@ -96,7 +96,7 @@ s.title "Stacked diagram" ############################### -s = Tk::Tcllib::Plotchart::HorizontalBarchart.new(vc1, [0.0, 10.0, 2.0], +s = Tk::Tcllib::Plotchart::HorizontalBarchart.new(vc1, [0.0, 10.0, 2.0], %w(A B C D E), 2) s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red') @@ -105,7 +105,7 @@ s.title "Arbitrary data" ############################### -s = Tk::Tcllib::Plotchart::HorizontalBarchart.new(vc2, [0.0, 20.0, 5.0], +s = Tk::Tcllib::Plotchart::HorizontalBarchart.new(vc2, [0.0, 20.0, 5.0], %w(A B C D E), :stacked) s.plot('series1', [1.0, 4.0, 6.0, 1.0, 7.0], 'red') @@ -114,7 +114,7 @@ s.title "Stacked diagram" ############################### -s = Tk::Tcllib::Plotchart::Timechart.new(vc3, "1 january 2004", +s = Tk::Tcllib::Plotchart::Timechart.new(vc3, "1 january 2004", "31 december 2004", 4) s.period("Spring", "1 march 2004", "1 june 2004", 'green') @@ -134,7 +134,7 @@ zc1 = TkCanvas.new(z, :background=>'white', :width=>400, :height=>300) zc2 = TkCanvas.new(z, :background=>'white', :width=>400, :height=>250) Tk.pack(zc1,zc2) -s = Tk::Tcllib::Plotchart::Plot3D.new(zc1, +s = Tk::Tcllib::Plotchart::Plot3D.new(zc1, [0, 10, 3], [-10, 10, 10], [0, 10, 2.5]) s.title "3D Plot" @@ -145,12 +145,12 @@ s.plot_function{|x, y| 3.0 * (1.0-(x1*x1+y1*y1))*(1.0-(x1*x1+y1*y1)) } -s = Tk::Tcllib::Plotchart::Plot3D.new(zc2, +s = Tk::Tcllib::Plotchart::Plot3D.new(zc2, [0, 10, 3], [-10, 10, 10], [0, 10, 2.5]) s.title "3D Plot - data " s.colour("green", "black") -s.plot_data([ [1.0, 2.0, 1.0, 0.0], - [1.1, 3.0, 1.1, -0.5], +s.plot_data([ [1.0, 2.0, 1.0, 0.0], + [1.1, 3.0, 1.1, -0.5], [3.0, 1.0, 4.0, 5.0] ]) ############################### |