Last active
August 23, 2017 19:42
-
-
Save arafatkatze/2be19af5efe1569663fa99d1864db42e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "github.com/Arafatk/glot" | |
func main() { | |
dimensions := 2 | |
// The dimensions supported by the plot | |
persist := false | |
debug := false | |
plot, _ := glot.NewPlot(dimensions, persist, debug) | |
pointGroupName := "Simple Circles" | |
style := "circle" | |
points := [][]float64{{7, 3, 13, 5.6, 11.1}, {12, 13, 11, 1, 7}} | |
// Adding a point group | |
plot.AddPointGroup(pointGroupName, style, points) | |
// A plot type used to make points/ curves and customize and save them as an image. | |
plot.SetTitle("Example Plot") | |
// Optional: Setting the title of the plot | |
plot.SetXLabel("X-Axis") | |
plot.SetYLabel("Y-Axis") | |
// Optional: Setting label for X and Y axis | |
plot.SetXrange(-2, 18) | |
plot.SetYrange(-2, 18) | |
// Optional: Setting axis ranges | |
plot.SavePlot("2.png") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment