Documentation
¶
Overview ¶
Package plot renders pure-text charts (histograms, scatter plots) for the UI. Functions here take an area and a theme and return a styled string; they never import bubbletea and hold no state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderHistogram ¶
RenderHistogram draws a horizontal-bar histogram of values into a string no wider than w. One line per bucket: right-aligned bucket range, a bar of block runes proportional to the bucket count, and the count itself. The caller is expected to scroll vertically when the result has more lines than h; the renderer never truncates buckets.
NaN/Inf values are skipped. With no usable values a friendly message is returned. buckets is clamped to 1..50; a single distinct value collapses to one bucket.
func RenderScatter ¶
RenderScatter draws an x/y scatter plot on a braille-dot canvas (2x4 dots per character cell) sized to fit within w x h, including y-axis labels on the left, an x-axis label line at the bottom and, when groups is non-nil, a legend line mapping each distinct group to its series color.
Points with NaN/Inf on either axis are skipped; groups (when non-nil) is indexed alongside xs/ys. Empty input and constant axes are handled.
Types ¶
This section is empty.