v2026.11.2
All Bundles
Bundle

A matplotlib-like plotting library: scatter, histogram, line and bar charts, subplots, as standalone SVG. A Figure holds one or more Axes; drawing the figure builds a PlotScene, an ordered list of pixel-space drawing primitives (lines, polylines, polygons, rects, circles, text), and a backend turns the scene into output. The SVG backend writes SVG 1.1 with no script and no external font, one decimal for every coordinate, so the same data gives the same bytes on every platform. Compile with -lib plot,gen_collect; it needs nothing else and draws without a display. Design: docs/PLOT_DESIGN.md. Examples: docs/AI.md, "Plotting".

SvgWriter

The SVG backend: turns a PlotScene into standalone SVG 1.1 text.

Operations

Render # function

Renders a scene.

function : Render(scene:PlotScene, title:String) ~ String

Parameters

NameTypeDescription
scenePlotScenewhat to draw
titleStringthe document title shown by viewers, may be empty

Return

TypeDescription
StringSVG 1.1 text