Skip to content

chrikoch/go-gnuplot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

API Reference

go-gnuplot

Golang wrapper for gnuplot command line
gnuplot has to be installed!

Limitations

Currently only timebased x-values are supported.

Example

	p := gnuplot.NewPlotter()
	if p == nil {
		return
	}
	point := gnuplot.TimeDataPoint{X: time.Now(), Y: 2}
	p.AddTimeDataPoint(point)
	point = gnuplot.TimeDataPoint{X: time.Now().Add(time.Second * 10), Y: 3}
	p.AddTimeDataPoint(point)
	point = gnuplot.TimeDataPoint{X: time.Now().Add(time.Second * 20), Y: 2}
	p.AddTimeDataPoint(point)

	img, err := p.Plot()
	if err != nil {
		log.Println(err)
		return
	}

	ioutil.WriteFile("/tmp/meinfile.png", img, os.ModePerm)

About

Golang wrapper for gnuplot command line

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages