6
"github.com/sbinet/go-gnuplot"
9
func TreeXDXD(x, y, z []float64) {
15
p, err := gnuplot.NewPlotter(fname, persist, debug)
17
err_string := fmt.Sprintf("** err: %v\n", err)
22
p.CheckedCmd("plot %f*x", 23.0)
23
p.CheckedCmd("plot %f * cos(%f * x)", 32.0, -3.0)
25
p.CheckedCmd("set terminal png")
26
p.CheckedCmd("set output 'plot001.png'")
27
p.CheckedCmd(`set terminal png size 1280,720 enhanced font "Helvetica,20"`)
28
p.CheckedCmd("set output 'output.png'")
29
p.CheckedCmd("replot")
45
func SplotMatrixFromFile(opt Option3D) error {
48
p, err := gnuplot.NewPlotter("", false, false)
54
p.CheckedCmd(`set terminal png size 1024,768 font "Helvetica,15.0"`)
55
p.CheckedCmd(`set output "` + opt.FileNameOut + `"`)
57
p.CheckedCmd(`splot "` + opt.FileNameDat + `" matrix w l`)
58
p.CheckedCmd("set pm3d")
59
p.CheckedCmd("unset surface")
60
p.CheckedCmd(`set title "` + opt.Titile + `"`)
61
p.CheckedCmd(`set xlabel "` + opt.Xlabel + `"`)
62
p.CheckedCmd(`set ylabel "` + opt.Ylabel + `"`)
63
p.CheckedCmd(`set zlabel "` + opt.Zlabel + `"`)
65
p.CheckedCmd(`set terminal png size 1024,768 font "Helvetica,15.0"`)
66
p.CheckedCmd(`set output "` + opt.FileNameOut + `"`)
67
p.CheckedCmd("replot")
69
p.CheckedCmd("set view map")
71
p.CheckedCmd(`set terminal png size 1024,768 font "Helvetica,15.0"`)
72
p.CheckedCmd(`set output "` + opt.FileNameOut + `"`)
73
p.CheckedCmd("replot")