basic

command
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

README

basic

This is an example of a basic lab.Browser with the files as the left panel, and the Tabber as the right panel.

You must run this from the command line, to get the interactive interpreter prompt.

Make some data

# x := rand(10)

Make a new plot

plt := plot.New()
plt.Add(plots.NewLine(plot.NewY(x)))
lab.Lab.Plot("plot", plt)

Attach some styling to the plot data

plot.SetStyler(x, func(s *plot.Style) {
	s.Plot.Title = "Test Line"
	s.Plot.XAxis.Label = "X Axis"
	s.Line.Color = colors.Uniform(colors.Red)
})

Note: you have to regenerate the plot to get these styles to take effect.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL