🌐 Website · 📚 Documentation
Pure-Go (CGO=0) plotting for go-ndarray: matplotlib-class figures to SVG and PNG, with real TeX in the labels.
The object model and the defaults are matplotlib's — figure size, fonts, colour
cycle, margins, tick placement and tick labels — so a figure looks the way a
matplotlib user expects, and the parts that can be equal are tested equal to
matplotlib: tick locations and labels on 408 real axes, eight colormaps entry
for entry, and the layout of 30 figures. The API is the object-oriented one
most notebooks use (fig, ax = plt.subplots(); ax.plot(...)). What Go adds:
one static binary, js/wasm, no Python, and TeX labels set by a real TeX math
typesetter (go-tex/math).
fig, axs := plot.Subplots(1, 1)
ax := axs[0][0]
ax.Plot(x, y, plot.Label(`$\sin t$`))
ax.SetXLabel(`time $t$ (s)`)
ax.Legend()
fig.SavePNG(os.Stdout)| Repo | What it is |
|---|---|
| plot | the library: Figure, Axes and every plot type, ticks, colormaps, contours, the SVG and raster back-ends, TeX labels (Go 1.27.2 or later) |
| docs | the documentation site (Hugo + Hextra), served at /docs/ |
| go-plot.github.io | the landing page (Hugo) |
| brand | logo, icons and social images |
It is part of an ecosystem with go-ndarray
(NumPy-style arrays), go-fft (numpy.fft) and
go-notebook (Go notebooks), whose
kernel shows a figure through Figure.Display.
