No matching definitions.

plot/decor

src/plot/decor.tur

an axis line or a set of tick grid lines, drawn by the plot

defstruct

HRuleR

(defstruct HRuleR :copy [y : float style : LineStyle])

a horizontal reference line at data y.

defstruct

VRuleR

(defstruct VRuleR :copy [x : float style : LineStyle])

a vertical reference line at data x.

defstruct

LabelR

(defstruct LabelR :copy [x : float y : float text : cstr style : LineStyle])

a text label anchored at one (x, y) data point.

defn

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)
defn

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)
defn

axes

(axes :)

both x-axis and y-axis.

The Axes decoration, boxed as an AnyRenderer.

(plot (vec-of (axes) (lines pts ls "")) opts)
defn

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)
defn

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)
defn

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)
defn

hrule-styled

(hrule-styled [y : float style : LineStyle] :)

horizontal reference line with explicit style.

ythe line's data y
stylethe LineStyle to stroke with

An HRuleR boxed as an AnyRenderer.

(hrule-styled 0.5 (line-style 1 2.0 (dash-dash) 1.0))
defn

hrule

(hrule [y : float] :)

horizontal reference line.

ythe line's data y

An HRuleR in the default line style, boxed as an AnyRenderer.

(hrule 0.5)
defn

vrule-styled

(vrule-styled [x : float style : LineStyle] :)

vertical reference line with explicit style.

xthe line's data x
stylethe LineStyle to stroke with

A VRuleR boxed as an AnyRenderer.

(vrule-styled 1.0 (line-style 2 1.0 (dash-dot) 1.0))
defn

vrule

(vrule [x : float] :)

vertical reference line.

xthe line's data x

A VRuleR in the default line style, boxed as an AnyRenderer.

(vrule 1.0)
defn

point-label-styled

(point-label-styled [x : float y : float text : cstr anchor : int style : LineStyle] :)

styled label text anchored to a data point.

xthe anchor's data x
ythe anchor's data y
textthe label text
anchorreserved
stylea LineStyle (its color colors the text)

A LabelR boxed as an AnyRenderer.

(point-label-styled 1.0 1.0 "peak" 0 (default-line-style))
defn

point-label

(point-label [x : float y : float text : cstr anchor : int] :)

label text anchored to a data point.

xthe anchor's data x
ythe anchor's data y
textthe label text
anchorreserved

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]