Command: plot/add-axes

The plot/add-axes command draws up to four labelled 'axis' (top/right/bottom/left) and changes the document layout so that further painting takes place inside of the rectangle described by the axes.

Syntax

(plot/add-axes <options>)
(plot/add-axes 
position (...)
scale (...)
scale-x (...)
scale-y (...)
scale-top (...)
scale-right (...)
scale-bottom (...)
scale-left (...)
limit-x (...)
limit-y (...)
limit-top (...)
limit-right (...)
limit-bottom (...)
limit-left (...)
label-placement-x (...)
label-placement-y (...)
label-placement-top (...)
label-placement-right (...)
label-placement-bottom (...)
label-placement-left (...)
label-format (...)
label-format-x (...)
label-format-y (...)
label-format-top (...)
label-format-right (...)
label-format-bottom (...)
label-format-left (...)
label-attach-top (...)
label-attach-right (...)
label-attach-bottom (...)
label-attach-left (...)
label-offset-top (...)
label-offset-right (...)
label-offset-bottom (...)
label-offset-left (...)
label-padding-top (...)
label-padding-right (...)
label-padding-bottom (...)
label-padding-left (...)
label-rotate-top (...)
label-rotate-right (...)
label-rotate-bottom (...)
label-rotate-left (...)
label-color (...)
label-color-x (...)
label-color-y (...)
label-color-top (...)
label-color-right (...)
label-color-bottom (...)
label-color-left (...)
label-font-size (...)
label-font-size-x (...)
label-font-size-y (...)
label-font-size-top (...)
label-font-size-right (...)
label-font-size-bottom (...)
label-font-size-left (...)
tick-placement-x (...)
tick-placement-y (...)
tick-placement-top (...)
tick-placement-right (...)
tick-placement-bottom (...)
tick-placement-left (...)
tick-offset-top (...)
tick-offset-right (...)
tick-offset-bottom (...)
tick-offset-left (...)
tick-length-top (...)
tick-length-right (...)
tick-length-bottom (...)
tick-length-left (...)
title-x (...)
title-y (...)
title-top (...)
title-right (...)
title-bottom (...)
title-left (...)
title-offset-top (...)
title-offset-right (...)
title-offset-bottom (...)
title-offset-left (...)
title-padding-top (...)
title-padding-right (...)
title-padding-bottom (...)
title-padding-left (...)
title-rotate-top (...)
title-rotate-right (...)
title-rotate-bottom (...)
title-rotate-left (...)
title-color (...)
title-color-top (...)
title-color-right (...)
title-color-bottom (...)
title-color-left (...)
title-font (...)
title-font-top (...)
title-font-right (...)
title-font-bottom (...)
title-font-left (...)
title-font-size (...)
title-font-size-top (...)
title-font-size-right (...)
title-font-size-bottom (...)
title-font-size-left (...)
border-width (...)
border-width-top (...)
border-width-right (...)
border-width-bottom (...)
border-width-left (...)
border-color (...)
border-color-top (...)
border-color-right (...)
border-color-bottom (...)
border-color-left (...)
border-syle (...)
border-syle-top (...)
border-syle-right (...)
border-syle-bottom (...)
border-syle-left (...))

Options

position

Controls which the axes are drawn. By default, all four axes (top/right/bottom/left) are drawn.

position (top|right|bottom|left)
Examples:
;; show only the right and bottom axes
position (right bottom)

;; hide all axes
position ()

scale

Set the axis scale type.

scale ([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 (log)

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

scale-x

Set the axis scale type for the top/bottom axes.

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

Set the axis scale type for the left/right axes.

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)

scale-top

Set the axis scale type for the top axes.

scale-top ([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-top (log)

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

scale-right

Set the axis scale type for the right axes.

scale-right ([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-right (log)

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

scale-bottom

Set the axis scale type for the bottom axes.

scale-bottom ([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-bottom (log)

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

scale-left

Set the axis scale type for the left axes.

scale-left ([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-left (log)

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

limit-x

Set the axis limits (minimum and maximum value) for the top/bottom axes.

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

limit-y

Set the axis limits (minimum and maximum value) for the left/right axes.

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

limit-top

Set the axis limits (minimum and maximum value) for the top axes.

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

limit-right

Set the axis limits (minimum and maximum value) for the right axes.

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

limit-bottom

Set the axis limits (minimum and maximum value) for the bottom axes.

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

limit-left

Set the axis limits (minimum and maximum value) for the left axes.

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

label-placement-x

The 'label-placement-x' option controls the axis label placement for the top and bottom axes.

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

label-placement-y

The 'label-placement-y' option controls the axis label placement for the left and right axes.

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

label-placement-top

The 'label-placement-top' option controls the axis label placement for the top axis.

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

label-placement-right

The 'label-placement-right' option controls the axis label placement for the right axis.

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

label-placement-bottom

The 'label-placement-bottom' option controls the axis label placement for the bottom axis.

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

label-placement-left

The 'label-placement-left' option controls the axis label placement for the left axis.

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

label-format

The 'label-format-x' option controls the axis label format

labels <labels>
Examples:
;; use scientific labels for the top/bottom axes
label-format (scientific)

label-format-x

The 'label-format-x' option controls the axis label format for the top and bottom axes.

labels <labels>
Examples:
;; use scientific labels for the top/bottom axes
label-format (scientific)

label-format-y

The 'label-format-y' option controls the axis label format for the left and right axes.

labels <labels>
Examples:
;; use scientific labels for the top/bottom axes
label-format (scientific)

label-format-top

The 'label-format-top' option controls the axis label format for the top axis.

labels <labels>
Examples:
;; use scientific labels for the top/bottom axes
label-format (scientific)

label-format-right

The 'label-format-right' option controls the axis label format for the right axis.

labels <labels>
Examples:
;; use scientific labels for the top/bottom axes
label-format (scientific)

label-format-bottom

The 'label-format-bottom' option controls the axis label format for the bottom axis.

labels <labels>
Examples:
;; use scientific labels for the top/bottom axes
label-format (scientific)

label-format-left

The 'label-format-left' option controls the axis label format for the left axis.

labels <labels>
Examples:
;; use scientific labels for the top/bottom axes
label-format (scientific)

label-attach-top

The 'label-attach-top' option controls the axis label attach for the top axis.

label-attach [top|right|bottom|left]
Examples:
;; set label attach to left
label-attach left

label-attach-right

The 'label-attach-right' option controls the axis label attach for the right axis.

label-attach [top|right|bottom|left]
Examples:
;; set label attach to left
label-attach left

label-attach-bottom

The 'label-attach-bottom' option controls the axis label attach for the bottom axis.

label-attach [top|right|bottom|left]
Examples:
;; set label attach to left
label-attach left

label-attach-left

The 'label-attach-left' option controls the axis label attach for the left axis.

label-attach [top|right|bottom|left]
Examples:
;; set label attach to left
label-attach left

label-offset-top

Controls to which side of the axis the labels are placed. Value is clamped to [-1, 1].

label-offset <value>
Examples:
;; center the labels
label-offset 0

label-offset-right

Controls to which side of the axis the labels are placed. Value is clamped to [-1, 1].

label-offset <value>
Examples:
;; center the labels
label-offset 0

label-offset-bottom

Controls to which side of the axis the labels are placed. Value is clamped to [-1, 1].

label-offset <value>
Examples:
;; center the labels
label-offset 0

label-offset-left

Controls to which side of the axis the labels are placed. Value is clamped to [-1, 1].

label-offset <value>
Examples:
;; center the labels
label-offset 0

label-padding-top

Set the label padding/spacing. See the measure page for more details on valid values.

label-padding <measure>
Examples:
;; set the label padding to 2em
label-padding 2em

label-padding-right

Set the label padding/spacing. See the measure page for more details on valid values.

label-padding <measure>
Examples:
;; set the label padding to 2em
label-padding 2em

label-padding-bottom

Set the label padding/spacing. See the measure page for more details on valid values.

label-padding <measure>
Examples:
;; set the label padding to 2em
label-padding 2em

label-padding-left

Set the label padding/spacing. See the measure page for more details on valid values.

label-padding <measure>
Examples:
;; set the label padding to 2em
label-padding 2em

label-rotate-top

Rotate the labels. Value is in degrees clockwise.

label-rotate <value>
Examples:
;; rotate the label by 45deg clockwise
label-rotate 45

label-rotate-right

Rotate the labels. Value is in degrees clockwise.

label-rotate <value>
Examples:
;; rotate the label by 45deg clockwise
label-rotate 45

label-rotate-bottom

Rotate the labels. Value is in degrees clockwise.

label-rotate <value>
Examples:
;; rotate the label by 45deg clockwise
label-rotate 45

label-rotate-left

Rotate the labels. Value is in degrees clockwise.

label-rotate <value>
Examples:
;; rotate the label by 45deg clockwise
label-rotate 45

label-color

The 'label-color' option controls the axis label color.

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

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

label-color-x

The 'label-color-x' option controls the axis label color for the top and bottom axes.

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

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

label-color-y

The 'label-color-y' option controls the axis label color for the left and right axes.

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

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

label-color-top

The 'label-color-top' option controls the axis label color for the top axis.

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

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

label-color-right

The 'label-color-right' option controls the axis label color for the right axis.

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

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

label-color-bottom

The 'label-color-bottom' option controls the axis label color for the bottom axis.

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

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

label-color-left

The 'label-color-left' option controls the axis label color for the left axis.

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

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

label-font-size

The 'label-font-size' option controls the axis label font-size.

label-font-size <measure>
Examples:
;; set the font size to 14pt
label-font-size 14pt

label-font-size-x

The 'label-font-size-x' option controls the axis label font-size for the top and bottom axes.

label-font-size-x <measure>
Examples:
;; set the font size to 14pt
label-font-size-x 14pt

label-font-size-y

The 'label-font-size-y' option controls the axis label font-size for the left and right axes.

label-font-size-y <measure>
Examples:
;; set the font size to 14pt
label-font-size-y 14pt

label-font-size-top

The 'label-font-size-top' option controls the axis label font-size for the top axis.

label-font-size-top <measure>
Examples:
;; set the font size to 14pt
label-font-size-top 14pt

label-font-size-right

The 'label-font-size-right' option controls the axis label font-size for the right axis.

label-font-size-right <measure>
Examples:
;; set the font size to 14pt
label-font-size-right 14pt

label-font-size-bottom

The 'label-font-size-bottom' option controls the axis label font-size for the bottom axis.

label-font-size-bottom <measure>
Examples:
;; set the font size to 14pt
label-font-size-bottom 14pt

label-font-size-left

The 'label-font-size-left' option controls the axis label font-size for the left axis.

label-font-size-left <measure>
Examples:
;; set the font size to 14pt
label-font-size-left 14pt

tick-placement-x

The 'tick-placement' option controls where on the axis the "ticks" are placed.

tick-placement <tick-placement>
Examples:
;; subdivide the axis into 10 parts

tick-placement-y

The 'tick-placement' option controls where on the axis the "ticks" are placed.

tick-placement <tick-placement>
Examples:
;; subdivide the axis into 10 parts

tick-placement-top

The 'tick-placement' option controls where on the axis the "ticks" are placed.

tick-placement <tick-placement>
Examples:
;; subdivide the axis into 10 parts

tick-placement-right

The 'tick-placement' option controls where on the axis the "ticks" are placed.

tick-placement <tick-placement>
Examples:
;; subdivide the axis into 10 parts

tick-placement-bottom

The 'tick-placement' option controls where on the axis the "ticks" are placed.

tick-placement <tick-placement>
Examples:
;; subdivide the axis into 10 parts

tick-placement-left

The 'tick-placement' option controls where on the axis the "ticks" are placed.

tick-placement <tick-placement>
Examples:
;; subdivide the axis into 10 parts

tick-offset-top

Controls to which side of the axis the ticks are drawn. Value is clamped to [-1, 1].

tick-offset <value>
Examples:
;; center the ticks
ticks-offset 0

tick-offset-right

Controls to which side of the axis the ticks are drawn. Value is clamped to [-1, 1].

tick-offset <value>
Examples:
;; center the ticks
ticks-offset 0

tick-offset-bottom

Controls to which side of the axis the ticks are drawn. Value is clamped to [-1, 1].

tick-offset <value>
Examples:
;; center the ticks
ticks-offset 0

tick-offset-left

Controls to which side of the axis the ticks are drawn. Value is clamped to [-1, 1].

tick-offset <value>
Examples:
;; center the ticks
ticks-offset 0

tick-length-top

Controls the length of the ticks

tick-length <measure>
Examples:
;; set tick length to 1em
ticks-length 1em

tick-length-right

Controls the length of the ticks

tick-length <measure>
Examples:
;; set tick length to 1em
ticks-length 1em

tick-length-bottom

Controls the length of the ticks

tick-length <measure>
Examples:
;; set tick length to 1em
ticks-length 1em

tick-length-left

Controls the length of the ticks

tick-length <measure>
Examples:
;; set tick length to 1em
ticks-length 1em

title-x

Set the axis title

title <title>
Examples:
;; set the axis title to "Time"
title "Time"

title-y

Set the axis title

title <title>
Examples:
;; set the axis title to "Time"
title "Time"

title-top

Set the axis title

title <title>
Examples:
;; set the axis title to "Time"
title "Time"

title-right

Set the axis title

title <title>
Examples:
;; set the axis title to "Time"
title "Time"

title-bottom

Set the axis title

title <title>
Examples:
;; set the axis title to "Time"
title "Time"

title-left

Set the axis title

title <title>
Examples:
;; set the axis title to "Time"
title "Time"

title-offset-top

Controls to which side of the axis the title is placed. Value is clamped to [-1, 1].

title-offset <value>
Examples:
;; center the title
title-offset 0

title-offset-right

Controls to which side of the axis the title is placed. Value is clamped to [-1, 1].

title-offset <value>
Examples:
;; center the title
title-offset 0

title-offset-bottom

Controls to which side of the axis the title is placed. Value is clamped to [-1, 1].

title-offset <value>
Examples:
;; center the title
title-offset 0

title-offset-left

Controls to which side of the axis the title is placed. Value is clamped to [-1, 1].

title-offset <value>
Examples:
;; center the title
title-offset 0

title-padding-top

Set the title padding/spacing. See the measure page for more details on valid values.

title-padding <measure>
Examples:
;; set the title padding to 2em
title-padding 2em

title-padding-right

Set the title padding/spacing. See the measure page for more details on valid values.

title-padding <measure>
Examples:
;; set the title padding to 2em
title-padding 2em

title-padding-bottom

Set the title padding/spacing. See the measure page for more details on valid values.

title-padding <measure>
Examples:
;; set the title padding to 2em
title-padding 2em

title-padding-left

Set the title padding/spacing. See the measure page for more details on valid values.

title-padding <measure>
Examples:
;; set the title padding to 2em
title-padding 2em

title-rotate-top

Rotate the title. Value is in degrees clockwise.

title-rotate <value>
Examples:
;; rotate the title by 45deg clockwise
title-rotate 45

title-rotate-right

Rotate the title. Value is in degrees clockwise.

title-rotate <value>
Examples:
;; rotate the title by 45deg clockwise
title-rotate 45

title-rotate-bottom

Rotate the title. Value is in degrees clockwise.

title-rotate <value>
Examples:
;; rotate the title by 45deg clockwise
title-rotate 45

title-rotate-left

Rotate the title. Value is in degrees clockwise.

title-rotate <value>
Examples:
;; rotate the title by 45deg clockwise
title-rotate 45

title-color

Set the axis title color.

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

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

title-color-top

Set the axis title color.

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

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

title-color-right

Set the axis title color.

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

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

title-color-bottom

Set the axis title color.

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

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

title-color-left

Set the axis title color.

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

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

title-font

Set the axis title font.

title-font <measure>
Examples:
;; set the font size to 14pt
title-font 14pt

title-font-top

Set the axis title font.

title-font-top <measure>
Examples:
;; set the font size to 14pt
title-font-top 14pt

title-font-right

Set the axis title font.

title-font-right <measure>
Examples:
;; set the font size to 14pt
title-font-right 14pt

title-font-bottom

Set the axis title font.

title-font-bottom <measure>
Examples:
;; set the font size to 14pt
title-font-bottom 14pt

title-font-left

Set the axis title font.

title-font-left <measure>
Examples:
;; set the font size to 14pt
title-font-left 14pt

title-font-size

Set the axis title font size.

title-font-size <measure>
Examples:
;; set the font size to 14pt
title-font-size 14pt

title-font-size-top

Set the axis title font size.

title-font-size-top <measure>
Examples:
;; set the font size to 14pt
title-font-size-top 14pt

title-font-size-right

Set the axis title font size.

title-font-size-right <measure>
Examples:
;; set the font size to 14pt
title-font-size-right 14pt

title-font-size-bottom

Set the axis title font size.

title-font-size-bottom <measure>
Examples:
;; set the font size to 14pt
title-font-size-bottom 14pt

title-font-size-left

Set the axis title font size.

title-font-size-left <measure>
Examples:
;; set the font size to 14pt
title-font-size-left 14pt

border-width

Set the width of the axis border/line.

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

border-width-top

Set the width of the top axis border/line.

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

border-width-right

Set the width of the right axis border/line.

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

border-width-bottom

Set the width of the bottom axis border/line.

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

border-width-left

Set the width of the left axis border/line.

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

border-color

Set the color of the axis border/line.

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

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

border-color-top

Set the color of the top axis border/line.

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

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

border-color-right

Set the color of the right axis border/line.

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

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

border-color-bottom

Set the color of the bottom axis border/line.

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

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

border-color-left

Set the color of the left axis border/line.

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

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

border-syle

Set the stroke style of the axis border/line.

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

border-syle-top

Set the stroke style of the top axis border/line.

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

border-syle-right

Set the stroke style of the right axis border/line.

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

border-syle-bottom

Set the stroke style of the bottom axis border/line.

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

border-syle-left

Set the stroke style of the left axis border/line.

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

Examples

Edit this page on GitHub