Commits

Anonymous committed 82d2f4b

update examples for float64

Comments (0)

Files changed (5)

src/examples/t002.go

 	}
 	defer p.Close()
 
-	p.PlotXY([]float{0,1,2,3,4,5,6,7,8,9,10}, "some data")
+	p.PlotXY([]float64{0,1,2,3,4,5,6,7,8,9,10}, "some data")
 	p.CheckedCmd("set terminal pdf")
 	p.CheckedCmd("set output 'plot002.pdf'")
 	p.CheckedCmd("replot")

src/examples/t003.go

 	}
 	defer p.Close()
 
-	p.PlotXY([]float{0,1,2,3,4,5,6,7,8,9,10}, 
-		     []float{0,1,2,3,4,5,6,7,8,9,10}, "some data - x/y")
+	p.PlotXY([]float64{0,1,2,3,4,5,6,7,8,9,10}, 
+		     []float64{0,1,2,3,4,5,6,7,8,9,10}, "some data - x/y")
 	p.SetXLabel("my x data")
 	p.SetYLabel("my y data")
 	p.CheckedCmd("set terminal pdf")

src/examples/t004.go

 	defer p.Close()
 
 	p.SetStyle("steps")
-	p.PlotFunc([]float{0,1,2,3,4,5,6,7,8,9,10}, 
-		func (x float) float {return float(math.Exp(float64(x) + 2.))},
+	p.PlotFunc([]float64{0,1,2,3,4,5,6,7,8,9,10}, 
+		func (x float64) float64 {return math.Exp(float64(x) + 2.)},
 		"test plot-func")
 	p.SetXLabel("my x data")
 	p.SetYLabel("my y data")

src/examples/t005.go

 	p.CheckedCmd("set grid y")
 	p.CheckedCmd("set grid z")
 	p.PlotXYZ(
-		[]float{0,1,2,3,4,5,6,7,8,9,10},
-		[]float{0,1,2,3,4,5,6,7,8,9,10},
-		[]float{0,1,2,3,4,5,6,7,8,9,10},
+		[]float64{0,1,2,3,4,5,6,7,8,9,10},
+		[]float64{0,1,2,3,4,5,6,7,8,9,10},
+		[]float64{0,1,2,3,4,5,6,7,8,9,10},
 		"test 3d plot")
 	p.SetLabels("x", "y", "z")
 	p.CheckedCmd("set terminal pdf")

src/examples/t006.go

 	p.CheckedCmd("set grid z")
 	p.PlotNd(
 		"test Nd plot",
-		[]float{0,1,2,3,4,5,6,7,8,9,10},
-		[]float{0,1,2,3,4,5,6,7,8,9,10},
-		[]float{0,1,2,3,4,5,6,7,8,9,10})
+		[]float64{0,1,2,3,4,5,6,7,8,9,10},
+		[]float64{0,1,2,3,4,5,6,7,8,9,10},
+		[]float64{0,1,2,3,4,5,6,7,8,9,10})
 	p.SetLabels("x", "y", "z")
 	p.CheckedCmd("set terminal pdf")
 	p.CheckedCmd("set output 'plot006.pdf'")