No matching definitions.

plot/point

src/plot/point.tur
defstruct

PointsR

(defstruct PointsR :copy [points : (Vec Point) style : PointStyle label : cstr])

a scatter of its points.

defstruct

ErrorBarsR

(defstruct ErrorBarsR :copy [bars : (Vec ErrorBar) style : LineStyle horizontal : bool label : cstr])

error bars spanning y +/- err, or x +/- err when

defstruct

VectorFieldR

(defstruct VectorFieldR :copy [f : (fn [float float])

the direction f(x, y) (a Point: dx, dy) drawn on a samples x samples grid

defstruct

ArrowsR

(defstruct ArrowsR :copy [arrows : (Vec Arrow) style : LineStyle label : cstr])

explicit arrows.

defn

points

(points [vs : (Vec Point) style : PointStyle label : cstr] :)

scatter plot renderer.

vsthe points
stylethe PointStyle of the markers
labellegend text ("" for none)

A PointsR boxed as an AnyRenderer.

(points (vec-of (Point 1.0 2.0) (Point 2.0 3.5)) (default-point-style) "samples")
defn

error-bars

(error-bars [bars : (Vec ErrorBar) style : LineStyle horizontal : bool label : cstr] :)

vertical or horizontal error bars.

barsthe error bars
stylethe LineStyle to stroke with
horizontaltrue for x +/- err, false for y +/- err
labellegend text ("" for none)

An ErrorBarsR boxed as an AnyRenderer.

(error-bars (vec-of (ErrorBar 1.0 2.0 0.25)) (default-line-style) false "err")
defn

vector-field

(vector-field [^fat f : (fn [float float])

draw the direction f(x, y) at each point of a grid.

fthe field, a (fn [float float] Point) giving (dx, dy)
x-minleft edge of the sampled domain
x-maxright edge of the sampled domain
y-minbottom edge of the sampled domain
y-maxtop edge of the sampled domain
samplesgrid points per axis
scale-mode0 raw, 1 normalised, 2 raw at a larger scale
stylethe LineStyle to stroke with
labellegend text ("" for none)

A VectorFieldR boxed as an AnyRenderer.

(vector-field (fn [x : float y : float] : Point (Point (- 0.0 y) x))
                -1.0 1.0 -1.0 1.0 8 1 (default-line-style) "field")
defn

arrows

(arrows [arrow-list : (Vec Arrow) style : LineStyle label : cstr] :)

explicit arrow segments.

arrow-listthe arrows
stylethe LineStyle to stroke with
labellegend text ("" for none)

An ArrowsR boxed as an AnyRenderer.

(arrows (vec-of (Arrow 0.0 0.0 1.0 1.0)) (default-line-style) "moves")
Internal definitions
__draw-points-- fill and outline a marker at each lowered point.
__draw-error-bars-- stroke each lowered (x . (y . h)) bar, x +/- h when `horizontal`.
__draw-arrows-- stroke each lowered (x1 . (y1 . (x2 . y2))) segment with a head.
__draw-vector-field-- stroke the direction f(x, y) on a grid x grid lattice.
Renderer[PointsR]
Renderer[ErrorBarsR]
Renderer[VectorFieldR]
Renderer[ArrowsR]