plot/data
src/plot/data.tur
the typed data a renderer draws: points, rectangles, error
defstruct
Point
(defstruct Point :copy [x : float y : float])
a data point, or (for a vector field's callback) a direction.
defstruct
Rect
(defstruct Rect :copy [x0 : float x1 : float y0 : float y1 : float])
the axis-aligned rectangle between x0..x1 and y0..y1 (either end
defstruct
ErrorBar
(defstruct ErrorBar :copy [x : float y : float err : float])
a value y at x with symmetric error `err`.
defstruct
Arrow
(defstruct Arrow :copy [x0 : float y0 : float x1 : float y1 : float])
an arrow from (x0, y0) to (x1, y1), head at the second point.
defstruct
Bar
(defstruct Bar :copy [label : cstr height : float])
one category of a discrete histogram: its tick label and height.
defstruct
Group
(defstruct Group :copy [label : cstr values : (Vec float)])
one category of a stacked histogram: its tick label and the
defopaque
Cells
(Cells)
internal: a renderer's data lowered to the cons cells the C draw
Internal definitions
__cell-- internal: a fresh cons cell (head . tail), as a word.__bits-- internal: a double's bit pattern, as the cells store it.__text-word-- internal: a cstr's pointer, as the cells store it.__cells-raw-- internal: a built cell list's word as a bare pointer.__as-cells-- internal: a built cell list as Cells.__points-from__points->cells-- internal: ((x . y) ...), one pair per point.__values-from__values->cells-- internal: (v ...), one bit pattern per value.__error-bars-from__error-bars->cells-- internal: ((x . (y . err)) ...).__quad-- internal: the cells (a . (b . (c . d))).__arrows-from__arrows->cells-- internal: ((x0 . (y0 . (x1 . y1))) ...).__rects-from__rects->cells-- internal: ((x0 . (x1 . (y0 . y1))) ...).__bars-from__bars->cells-- internal: ((label . height) ...).__groups-from__groups->cells-- internal: ((label . (v ...)) ...); free with __free-groups.__labels-from__labels->cells-- internal: ((label . 0) ...), the category ticks' shape.__free-cells-- internal: free a lowered list whose elements are chains of__free-groups-- internal: free a list built by `__groups->cells`.