plot/grid

The plot/grid element draws a background grid.

Syntax

grid (
tick-placement-x (...)
tick-placement-y (...)
stroke-style (...)
stroke-width (...)
stroke-color (...)
color (...)
scale-x (...)
scale-y (...)
limit-x (...)
limit-x-min (...)
limit-x-max (...)
limit-y (...)
limit-y-min (...)
limit-y-max (...))

Options

tick-placement-x <>

The 'tick-placement-x' option controls the x grid placement.

tick-placement-x <tick-placement>
Examples:
;; subdivide the axis with 10 tick-placement

tick-placement-y <>

The 'tick-placement-y' option controls the y grid placement.

tick-placement-y <tick-placement>
Examples:
;; subdivide the axis with 10 tick-placement

stroke-style <stroke_style>

Set the grid's stroke style.

stroke-style (<stroke-style>)
Examples:
;; set the stroke to dashed
stroke-style dashed

stroke-width <stroke_width>

Set the grid's stroke width.

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

stroke-color <color>

Set the grid'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)

color <>

The plot/grid element draws a background grid.

Alias for the stroke-color option.

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
Edit this page on GitHub