plot/decor
an axis line or a set of tick grid lines, drawn by the plot
HRuleR
(defstruct HRuleR :copy [y : float style : LineStyle])
a horizontal reference line at data y.
VRuleR
(defstruct VRuleR :copy [x : float style : LineStyle])
a vertical reference line at data x.
LabelR
(defstruct LabelR :copy [x : float y : float text : cstr style : LineStyle])
a text label anchored at one (x, y) data point.
x-axis
(x-axis :)
horizontal axis at y=0.
The XAxis decoration, boxed as an AnyRenderer.
(plot (vec-of (x-axis) (lines pts ls "")) opts)
y-axis
(y-axis :)
vertical axis at x=0.
The YAxis decoration, boxed as an AnyRenderer.
(plot (vec-of (y-axis) (lines pts ls "")) opts)
axes
(axes :)
both x-axis and y-axis.
The Axes decoration, boxed as an AnyRenderer.
(plot (vec-of (axes) (lines pts ls "")) opts)
x-tick-lines
(x-tick-lines :)
vertical grid lines at x ticks.
The XTickLines decoration, boxed as an AnyRenderer.
(plot (vec-of (x-tick-lines) (lines pts ls "")) opts)
y-tick-lines
(y-tick-lines :)
horizontal grid lines at y ticks.
The YTickLines decoration, boxed as an AnyRenderer.
(plot (vec-of (y-tick-lines) (lines pts ls "")) opts)
tick-grid
(tick-grid :)
both x and y tick lines.
The TickGrid decoration, boxed as an AnyRenderer.
(plot (vec-of (tick-grid) (axes) (lines pts ls "")) opts)
hrule-styled
(hrule-styled [y : float style : LineStyle] :)
horizontal reference line with explicit style.
| y | the line's data y | |
| style | the LineStyle to stroke with |
An HRuleR boxed as an AnyRenderer.
(hrule-styled 0.5 (line-style 1 2.0 (dash-dash) 1.0))
hrule
(hrule [y : float] :)
horizontal reference line.
| y | the line's data y |
An HRuleR in the default line style, boxed as an AnyRenderer.
(hrule 0.5)
vrule-styled
(vrule-styled [x : float style : LineStyle] :)
vertical reference line with explicit style.
| x | the line's data x | |
| style | the LineStyle to stroke with |
A VRuleR boxed as an AnyRenderer.
(vrule-styled 1.0 (line-style 2 1.0 (dash-dot) 1.0))
vrule
(vrule [x : float] :)
vertical reference line.
| x | the line's data x |
A VRuleR in the default line style, boxed as an AnyRenderer.
(vrule 1.0)
point-label-styled
(point-label-styled [x : float y : float text : cstr anchor : int style : LineStyle] :)
styled label text anchored to a data point.
| x | the anchor's data x | |
| y | the anchor's data y | |
| text | the label text | |
| anchor | reserved | |
| style | a LineStyle (its color colors the text) |
A LabelR boxed as an AnyRenderer.
(point-label-styled 1.0 1.0 "peak" 0 (default-line-style))
point-label
(point-label [x : float y : float text : cstr anchor : int] :)
label text anchored to a data point.
| x | the anchor's data x | |
| y | the anchor's data y | |
| text | the label text | |
| anchor | reserved |
A LabelR in the default line style, boxed as an AnyRenderer.
(point-label 1.0 1.0 "peak" 0)
Internal definitions
__draw-hrule-- stroke a horizontal rule at data y across the viewport.__draw-vrule-- stroke a vertical rule at data x across the viewport.__draw-label-- fill `text` just above-right of the data point (x, y);__decoration-marks-- the axis line or tick grid a Decoration asks for.Renderer[Decoration]Renderer[HRuleR]Renderer[VRuleR]Renderer[LabelR]