No matching definitions.

plot/style

src/plot/style.tur
defopaque

LineStyle

(LineStyle)

how a line is stroked: palette color (-1 takes the next

defopaque

PointStyle

(PointStyle)

how a scatter marker is drawn: stroke and fill palette

defopaque

FillStyle

(FillStyle)

how an area is filled: palette color, alpha, outline color

defopaque

PlotOpts

(PlotOpts)

a plot's size, title, axis labels, bounds overrides and

defn

line-style

(line-style [color : int width : float dash : int alpha : float] :)

allocate a line-style value.

colorpalette index, or -1 for the next automatic color
widthstroke width in pixels (0.0 for the default 1.5)
dasha dash constant (dash-solid, dash-dash, ...)
alphaopacity (0.0 for the default 1.0)

A LineStyle.

(line-style 1 2.0 (dash-solid) 1.0)
defn

point-style

(point-style [color : int fill-color : int sym : int size : float alpha : float] :)

allocate a point-style value.

colorstroke palette index, or -1 for the next automatic color
fill-colorfill palette index, or -1 to match the stroke
syma symbol constant (sym-circle, sym-square, ...)
sizemarker size in pixels (0.0 for the default 6.0)
alphaopacity (0.0 for the default 1.0)

A PointStyle.

(point-style 2 -1 (sym-square) 8.0 1.0)
defn

fill-style

(fill-style [color : int alpha : float line-color : int line-width : float] :)

allocate a fill-style value.

colorpalette index, or -1 for the next automatic color
alphaopacity (0.0 for the default 0.5)
line-coloroutline palette index, or -1 to match the fill
line-widthoutline width in pixels

A FillStyle.

(fill-style 3 0.4 -1 1.0)
defn

plot-opts

(plot-opts [width : int height : int title : cstr x-label : cstr y-label : cstr x-min : float x-max : float y-min : float y-max : float legend-pos : int] :)

allocate a plot-opts value.

widthoutput width in pixels (0 for the default 600)
heightoutput height in pixels (0 for the default 450)
titletitle text, or a null cstr for none
x-labelx axis label, or a null cstr for none
y-labely axis label, or a null cstr for none
x-minx lower bound override (NaN to fit the data)
x-maxx upper bound override (NaN to fit the data)
y-miny lower bound override (NaN to fit the data)
y-maxy upper bound override (NaN to fit the data)
legend-pos0 none, 1 top right, 2 top left, 3 bottom right, 4 bottom left

A PlotOpts.

(plot-opts 800 600 "Title" "x" "y" nan nan nan nan 1)
defn

plot-opts-width

(plot-opts-width [opts : PlotOpts] :)

read the configured output width.

defn

plot-opts-height

(plot-opts-height [opts : PlotOpts] :)

read the configured output height.

defn

default-line-style

(default-line-style :)

default line style with auto color.

defn

default-point-style

(default-point-style :)

default point style with auto color.

defn

default-fill-style

(default-fill-style :)

default fill style with auto color.

defn

default-plot-opts

(default-plot-opts :)

default plot options.

defn

dash-solid

(dash-solid :)

solid stroke constant.

defn

dash-dash

(dash-dash :)

dashed stroke constant.

defn

dash-dot

(dash-dot :)

dotted stroke constant.

defn

dash-dash-dot

(dash-dash-dot :)

dash-dot stroke constant.

defn

sym-circle

(sym-circle :)

circle point symbol constant.

defn

sym-square

(sym-square :)

square point symbol constant.

defn

sym-triangle

(sym-triangle :)

triangle point symbol constant.

defn

sym-cross

(sym-cross :)

cross point symbol constant.

defn

sym-plus

(sym-plus :)

plus point symbol constant.

defn

sym-diamond

(sym-diamond :)

diamond point symbol constant.

defn

palette-size

(palette-size :)

number of built-in palette entries.

defn

palette-color

(palette-color [idx : int] :)

return (r g b) for palette index idx.

defn

color-seq

(color-seq [start-idx : int end-idx : int n : int] :)

interpolate between palette anchors and return nearest palette indices.

Internal definitions
__nan-- quiet NaN sentinel for auto bounds.
__null-cstr-- typed nil cstr sentinel.
__line-style-raw-- internal: allocate a LineStyle, as a bare pointer.
__point-style-raw-- internal: allocate a PointStyle, as a bare pointer.
__fill-style-raw-- internal: allocate a FillStyle, as a bare pointer.
__plot-opts-raw-- internal: allocate a PlotOpts, as a bare pointer.