Scales

Functions

  • col-mix - Blend two colours.
  • expand-limits - Ensure the trained domain includes the supplied values without replacing it.

Alpha scales

Colour and fill: binned

Colour and fill: continuous

Colour and fill: discrete

Colour and fill: manual and identity

Linetype scales

Linewidth scales

Palettes

  • brewer-palette - Look up a ColorBrewer palette by name.
  • okabe-ito - Okabe-Ito colour-vision-deficiency-safe qualitative palette.

Position scales

  • scale-x-binned - Binned continuous x scale: quantises a numeric axis into n-breaks bins.
  • scale-x-continuous - Continuous x scale: axis title, limits, breaks, labels, and transformation.
  • scale-x-date - Continuous x scale that formats axis labels as dates.
  • scale-x-datetime - Continuous x scale that formats axis labels as datetimes.
  • scale-x-discrete - Discrete x scale: axis title, level ordering, and tick labels.
  • scale-x-log10 - Continuous x scale on a base-10 log axis.
  • scale-x-reverse - Continuous x scale flipped left-to-right.
  • scale-x-sqrt - Continuous x scale on a square-root axis.
  • scale-x-time - Continuous x scale that formats axis labels as times of day.
  • scale-y-binned - Binned continuous y scale: quantises a numeric axis into n-breaks bins.
  • scale-y-continuous - Continuous y scale: axis title, limits, breaks, labels, and transformation.
  • scale-y-date - Continuous y scale that formats axis labels as dates.
  • scale-y-datetime - Continuous y scale that formats axis labels as datetimes.
  • scale-y-discrete - Discrete y scale: axis title, level ordering, and tick labels.
  • scale-y-log10 - Continuous y scale on a base-10 log axis.
  • scale-y-reverse - Continuous y scale flipped bottom-to-top.
  • scale-y-sqrt - Continuous y scale on a square-root axis.
  • scale-y-time - Continuous y scale that formats axis labels as times of day.

Secondary axes

  • dup-axis - Duplicate the primary axis on the opposite side of the panel.
  • sec-axis - Secondary axis derived from the primary through a transformation.

Shape scales

  • scale-shape - Discrete shape scale: maps levels to marker-shape keywords.
  • scale-shape-binned - Binned shape scale: cuts a continuous variable into n-breaks bins, each bin gets one shape from palette.
  • scale-shape-identity - Shape scale that uses each row’s value as the marker keyword directly.
  • scale-shape-manual - Manual discrete shape scale: supply the shape-keyword array directly.

Size scales

Stroke scales

Back to top