summaryrefslogtreecommitdiff
path: root/ext/tk/sample/tkextlib/tcllib/plotdemos1.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/sample/tkextlib/tcllib/plotdemos1.rb')
-rw-r--r--ext/tk/sample/tkextlib/tcllib/plotdemos1.rb22
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] ])
###############################