plot/errorbars

The plot/errorbars command takes an input data table, transforms it according to a user-provided scale configuration and then plots the data as one or more 'error bars'.

Syntax

errorbars (
data-x (...)
data-x-high (...)
data-x-low (...)
data-y (...)
data-y-high (...)
data-y-low (...)
width (...)
color (...)
colors (...)
color-map (...)
stroke-color (...)
stroke-width (...)
scale-x (...)
scale-y (...)
limit-x (...)
limit-x-min (...)
limit-x-max (...)
limit-y (...)
limit-y-min (...)
limit-y-max (...))

Options

data-x <dataset>

Set the 'x' dataset for the plot. The 'x' dataset will be used to calculate the horizontal position of geometry.

data-x (<values>...)
data-x (csv <file> <column>)
Examples:
;; list of static values
data-x (10px 20px 30px)

;; load a csv file
data-x (csv myfile.csv mycolumn)

data-x-high <>

The plot/errorbars command takes an input data table, transforms it according to a user-provided scale configuration and then plots the data as one or more 'error bars'.

Alias for the data-x option.

data-x-low <dataset>

The plot/errorbars command takes an input data table, transforms it according to a user-provided scale configuration and then plots the data as one or more 'error bars'.

data-x-low (<values>...)
data-x-low (csv <file> <column>)
Examples:
;; list of static values
data-x-low (10px 20px 30px)

;; load a csv file
data-x-low (csv myfile.csv mycolumn)

data-y <dataset Set the 'x' dataset for the plot. The 'x' dataset will be used to calculate the vertical position of geometry.>

The plot/errorbars command takes an input data table, transforms it according to a user-provided scale configuration and then plots the data as one or more 'error bars'.

data-y-high <>

The plot/errorbars command takes an input data table, transforms it according to a user-provided scale configuration and then plots the data as one or more 'error bars'.

Alias for the data-y option.

data-y-low <dataset>

The plot/errorbars command takes an input data table, transforms it according to a user-provided scale configuration and then plots the data as one or more 'error bars'.

data-y-low (<values>...)
data-y-low (csv <file> <column>)
Examples:
;; list of static values
data-y-low (10px 20px 30px)

;; load a csv file
data-y-low (csv myfile.csv mycolumn)

width <line_width>

The plot/errorbars command takes an input data table, transforms it according to a user-provided scale configuration and then plots the data as one or more 'error bars'.

color <color>

Set the error color.

color <color>
Examples:
;; set the color to grey
color #eee

;; set the color to red, 50% transparent
color (rgba 1 0 0 .5)

colors <dataset_colors>

Set an individual color for each errorbar. If no explicit color-map option is provided, the values in colors will be interpreted as hex color codes. Otherwise the mapping of input data to colors is controlled by the color-map option.

color-map <color_map>

Controls how input data is mapped to colors. If no map is specified, the values in colors will be interpreted as hex color values.

stroke-color <color>

Set the errorbar's stroke color.

stroke-color <color>
Examples:
;; set the color to grey
stroke-color #eee

;; set the color to red, 50% transparent
stroke-color (rgba 1 0 0 .5)

stroke-width <stroke_width>

Set the errorbar's stroke width.

stroke-width <measure>
Examples:
;; set the stroke width to 2pt
stroke-width 2pt

scale-x <scale>

Set the type of the 'x' (horizontal) scale.

scale-x ([linear] [log] [logarithmic] [invert] [inverted])
List of scale types: - `linear` - Standard linear scale - `log`, `logarithmic` - Logarithmic (log10) scale - `invert`, `inverted` - Flip the scale
Examples:
;; set the scale to logarithmic mode
scale-x (log)

;; set the scale to inverted mode
scale-x (invert)

scale-y <scale>

Set the type of the 'y' (vertical) scale.

scale-y ([linear] [log] [logarithmic] [invert] [inverted])
List of scale types: - `linear` - Standard linear scale - `log`, `logarithmic` - Logarithmic (log10) scale - `invert`, `inverted` - Flip the scale
Examples:
;; set the scale to logarithmic mode
scale-y (log)

;; set the scale to inverted mode
scale-y (invert)

limit-x <limit>

Set the limits (minimum and maximum values) for the 'x' (horizontal) scale.

limit-x (<min> <max)
Examples:
;; set limits to [1..10]
limit-x (1 10)

limit-x-min <limit_min>

Set the minimum value (lower limit) for the 'x' (horizontal) scale.

limit-x-min <min>
Examples:
;; set the lower limit to 2
limit-x-min 2

limit-x-max <limit-max>

Set the maximum value (upper limit) for the 'x' (horizontal) scale.

limit-x-max <value>
Examples:
;; set the upper limit to 20
limit-x-max 20

limit-y <limit>

Set the limits (minimum and maximum values) for the 'y' (vertical) scale.

limit-y (<min> <max)
Examples:
;; set limits to [1..10]
limit-y (1 10)

limit-y-min <limit_min>

Set the minimum value (lower limit) for the 'y' (vertical) scale.

limit-y-min <min>
Examples:
;; set the lower limit to 2
limit-y-min 2

limit-y-max <limit-max>

Set the maximum value (upper limit) for the 'y' (vertical) scale.

limit-y-max <value>
Examples:
;; set the upper limit to 20
limit-y-max 20

Examples

Example: examples/charts-scientific/errorbars_log


Edit this page on GitHub