No matching definitions.

plot/area

src/plot/area.tur
defstruct

RectanglesR

(defstruct RectanglesR :copy [rects : (Vec Rect) fill : FillStyle label : cstr])

rectangles in one fill.

defstruct

AreaHistogramR

(defstruct AreaHistogramR :copy [bars : (Vec Rect) fills : (Vec FillStyle) label : cstr])

pre-bucketed bars, each a Rect taking the next style

defstruct

DiscreteHistogramR

(defstruct DiscreteHistogramR :copy [bars : (Vec Bar) fill : FillStyle horizontal : bool label : cstr])

one Bar per category slot 0, 1, 2, ...;

defstruct

StackedHistogramR

(defstruct StackedHistogramR :copy [groups : (Vec Group) fills : (Vec FillStyle) labels : (Vec cstr) horizontal : bool])

one Group per category slot, a stack of its values,

defn

rectangles

(rectangles [rects : (Vec Rect) fill : FillStyle label : cstr] :)

draw filled rectangles.

rectsthe rectangles
fillthe FillStyle of the rectangles
labellegend text ("" for none)

A RectanglesR boxed as an AnyRenderer.

(rectangles (vec-of (Rect 0.0 1.0 0.0 2.0)) (default-fill-style) "boxes")
defn

area-histogram

(area-histogram [bars : (Vec Rect) fill-styles : (Vec FillStyle) label : cstr] :)

draw pre-bucketed bars with cycling fills.

barsthe bars, each a Rect
fill-stylesthe FillStyle of each bar, in order (the default past the end)
labellegend text ("" for none)

An AreaHistogramR boxed as an AnyRenderer.

(area-histogram buckets (vec-of (fill-style 0 0.5 -1 0.0) (fill-style 1 0.5 -1 0.0)) "hist")
defn

discrete-histogram

(discrete-histogram [bars : (Vec Bar) fill : FillStyle horizontal : bool label : cstr] :)

categorical bar chart.

barsone Bar per category
fillthe FillStyle of the bars
horizontaltrue to lay the bars along the y axis
labellegend text ("" for none)

A DiscreteHistogramR boxed as an AnyRenderer.

(discrete-histogram (vec-of (Bar "a" 3.0) (Bar "b" 5.0)) (default-fill-style) false "counts")
defn

stacked-histogram

(stacked-histogram [groups : (Vec Group) fills : (Vec FillStyle) labels : (Vec cstr) horizontal : bool] :)

stacked categorical bars.

groupsone Group per category
fillsthe FillStyle of each stack layer (the default past the end)
labelsthe layer names, listed in the legend
horizontaltrue to lay the stacks along the y axis

A StackedHistogramR boxed as an AnyRenderer.

(stacked-histogram (vec-of (Group "Q1" (vec-of 1.0 0.5)) (Group "Q2" (vec-of 1.25 0.75)))
                     (vec-of (default-fill-style) (default-fill-style))
                     (vec-of "base" "extra") false)
Internal definitions
__draw-rects-- fill each (x0 . (x1 . (y0 . y1))) quad with `fill`.
__draw-area-hist-- fill each (x0 . (x1 . (y0 . y1))) bar with the next
__draw-discrete-hist-- fill a 0.8-wide bar per (label . height) at slots
__draw-stacked-hist-- fill each (label . values) slot as a stack, each
__bar-labels-- the tick labels of `bars[i..n)` pushed onto `out`.
__copy-labels-- `labels[i..n)` pushed onto `out`.
__group-labels-- the tick labels of `groups[i..n)` pushed onto `out`.
Renderer[RectanglesR]
Renderer[AreaHistogramR]
Renderer[DiscreteHistogramR]
Renderer[StackedHistogramR]