Element: plot/rectangles

The plot/recatangles element is used to create tiled plots.

Syntax

(plot/rectangles <options>)

Example

Options

Rectangle Options

data-x data-y data-color data-size data-size-x data-size-y color color-map size size-x size-y

Scale Options

limit-x limit-x-min limit-x-max limit-y limit-y-min limit-y-max scale-x scale-y scale-x-padding scale-y-padding

Rectangle Options

data-x

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

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-y

Set the 'y' dataset for the plot. The 'y' dataset will be used to calculate the vertical position of the rectangles.

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

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

data-color

Set the 'color' dataset for the plot. The 'color' dataset will be used to calculate the color of rectangles. The mapping of input values to colors is controlled by the color-map option. If no explicit color-map option is provided, the values data-color will be interpreted as hex color codes.

data-color (<values>...)
data-color (csv <file> <column>)
Examples:
;; list of static values
data-color (#06c #c06 #06c)

;; load a csv file
data-color (csv myfile.csv mycolors)

data-size

Load the rectangle sizes from data.

data-size (<values>...)
data-size (csv <file> <column>)
Examples:
;; list of static values
data-size (2pt 8pt 5pt)

;; load a csv file
data-size (csv myfile.csv mysizes)

data-size-x

Load the rectangle widths from data

data-size-x (<values>...)
data-size-x (csv <file> <column>)
Examples:
;; list of static values
data-size-x (2pt 8pt 5pt)

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

data-size-y

Load the rectangle heights from data

data-size-y (<values>...)
data-size-y (csv <file> <column>)
Examples:
;; list of static values
data-size-y (2pt 8pt 5pt)

;; load a csv file
data-size-y (csv myfile.csv mysizes)

color

Set the point color. Note that this value is only used if no data-colors option is specified.

color <color>

color-map

Set the point color map. If no map is specified, the values in data-color will be interpreted as hex color values.

color-map <color-map>

size

Set rectangle size in both dimensions (x and y). Note that this value is only used if no data-size option is specified.

size <measure>
Examples:
;; set the rectangle size to 5pt
size 5pt

size-x

Set rectangle size in the x dimension. Note that this value is only used if no data-size option is specified.

size <measure>
Examples:
;; set the rectangle width to 5pt
size-x 5pt

size-y

Set rectangle size in the y dimension. Note that this value is only used if no data-size option is specified.

size <measure>
Examples:
;; set the rectangle height to 5pt
size-u 5pt

Scale Options

limit-x

Set the 'x' axis value range to the closed interval [min, max]. If no explicit limits are specified, the limit is set to the smallest interval that contains all input data points.

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

limit-x-min

Set the 'x' axis minimum value. If no explicit minimum is specified, the minimum is set to the smallest value in the input data set.

limit-x-min <min>
Examples:
;; set x axis min value to 2
limit-x-min 2

limit-x-max

Set the 'x' axis maximum value. If no explicit maximm is specified, the maximum is set to the largest value in the input data set.

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

limit-y

Set the 'y' axis value range to the closed interval [min, max]. If no explicit limits are specified, the limit is set to the smallest interval that contains all input data points.

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

limit-y-min

Set the 'y' axis minimum value. If no explicit minimum is specified, the minimum is set to the smallest value in the input data set.

limit-y-min <min>
Examples:
;; set y axis min value to 2
limit-y-min 2

limit-y-max

Set the 'y' axis maximum value. If no explicit maximm is specified, the maximum is set to the largest value in the input data set.

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

scale-x

Set the 'x' scale type.

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 x axis to logarithmic mode
scale-x (log)

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

scale-y

Set the 'y' scale type.

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 x axis to logarithmic mode
scale-y (log)

;; set x axis to inverted mode
scale-y (invert)

scale-x-padding

Set the 'x' scale 'padding'. The scale padding is used to extend the automatically assigned scale limits. The padding option is hence only useful when no explicit limits are specified (using limit-x). The padding is specified in the display unit system of the axis.

scale-x-padding <value>
Examples:
;; set x axis padding to 10
scale-x-padding 10

scale-y-padding

Set the 'y' scale 'padding'. The scale padding is used to extend the automatically assigned scale limits. The padding option is hence only useful when no explicit limits are specified (using limit-y). The padding is specified in the display unit system of the axis.

scale-y-padding <value>
Examples:
;; set y axis padding to 10
scale-y-padding 10
Edit this page on GitHub