theme

class theme(exponentFormat: Any? = null, line: Any? = null, rect: Any? = null, text: Any? = null, title: Any? = null, axis: Any? = null, axisOntop: Boolean? = null, axisOntopX: Boolean? = null, axisOntopY: Boolean? = null, axisTitle: Any? = null, axisTitleX: Any? = null, axisTitleY: Any? = null, axisText: Any? = null, axisTextX: Any? = null, axisTextY: Any? = null, axisTicks: Any? = null, axisTicksX: Any? = null, axisTicksY: Any? = null, axisTicksLength: Number? = null, axisTicksLengthX: Number? = null, axisTicksLengthY: Number? = null, axisLine: Any? = null, axisLineX: Any? = null, axisLineY: Any? = null, legendBackground: Any? = null, legendText: Any? = null, legendTitle: Any? = null, panelBackground: Any? = null, panelBorder: Any? = null, panelBorderOntop: Boolean? = null, panelGrid: Any? = null, panelGridMajor: Any? = null, panelGridMinor: Any? = null, panelGridMajorX: Any? = null, panelGridMinorX: Any? = null, panelGridMajorY: Any? = null, panelGridMinorY: Any? = null, panelGridOntop: Boolean? = null, panelGridOntopX: Boolean? = null, panelGridOntopY: Boolean? = null, panelInset: Any? = null, plotBackground: Any? = null, plotTitle: Any? = null, plotSubtitle: Any? = null, plotCaption: Any? = null, plotMessage: Any? = null, plotMargin: Any? = null, plotInset: Any? = null, stripBackground: Any? = null, stripText: Any? = null, axisTooltip: Any? = null, axisTooltipX: Any? = null, axisTooltipY: Any? = null, axisTooltipText: Any? = null, axisTooltipTextX: Any? = null, axisTooltipTextY: Any? = null, tooltip: Any? = null, tooltipText: Any? = null, tooltipTitleText: Any? = null, labelText: Any? = null, geom: Any? = null) : OptionsMap

Use theme() to modify individual components of a theme, allowing you to control the appearance of all non-data components of the plot.

All parameters responsible for styling of lines, rectangles (often called "background") and texts accept:

  • string "blank" or the result of the elementBlank() function.

  • the result of elementLine(), elementRect() or elementText() respectively.

Settings passed via more specific parameters override settings passed via less specific parameters. For example, parameter axisLineX is more specific than parameter axisLine.

Examples

Parameters

exponentFormat

default="e" ("e", "pow"). Format for numeric labels in scientific notation. e for "e" notation (e.g. 1e+6); pow for "power" notation (e.g. 1x10^6). This will enable superscript formatting for the exponent.

line

All line elements.

rect

All rectangle elements.

text

All text elements.

title

All line elements: plot, axes, legends.

axis

All axis elements: lines, ticks, texts, titles.

axisOntop

Option to place axis (lines, tick-marks and labels) over the data layers.

axisOntopX

Option to place X-axis (lines, tick-marks and labels) over the data layers.

axisOntopY

Option to place Y-axis (lines, tick-marks and labels) over the data layers.

axisTitle

Labels of axes.

axisTitleX

Labels of axes.

axisTitleY

Labels of axes.

axisText

Tick labels along axes.

axisTextX

Tick labels along axes.

axisTextY

Tick labels along axes.

axisTicks

Tick marks along axes.

axisTicksX

Tick marks along axes.

axisTicksY

Tick marks along axes.

axisTicksLength

Length of tick marks.

axisTicksLengthX

Length of tick marks.

axisTicksLengthY

Length of tick marks.

axisLine

Lines along axes.

axisLineX

Lines along axes.

axisLineY

Lines along axes.

legendBackground

Background of legend.

legendText

Legend item labels.

legendTitle

Title of legend.

panelBackground

Background of plotting area.

panelBorder

Border around plotting area.

panelBorderOntop

Option to place border around plotting area over the data layers.

panelGrid

Grid lines.

panelGridMajor

Grid lines.

panelGridMinor

Grid lines.

panelGridMajorX

Grid lines.

panelGridMinorX

Grid lines.

panelGridMajorY

Grid lines.

panelGridMinorY

Grid lines.

panelGridOntop

Option to place major grid lines and minor grid lines over the data layers.

panelGridOntopX

Option to place X-axis major grid lines and minor grid lines over the data layers.

panelGridOntopY

Option to place Y-axis major grid lines and minor grid lines over the data layers.

panelInset

Inset for a panel. The inset behaves like a padding for coordPolar(transofrmBkgr = false) otherwise it behaves like a margin around the panel. The inset may be specified using a number or a list of numbers:

  • a number or list of one number - the same inset it applied to all four sides;

  • a list of two numbers - the first inset applies to the top and bottom, the second - to the left and right;

  • a list of three numbers - the first margin applies to the top, the second - to the right and left, the third - to the bottom;

  • a list of four numbers - the insets are applied to the top, right, bottom and left in that order. It is acceptable to use null for any side; in this case, the default value for the plot inset side will be used.

plotBackground

Background of the entire plot.

plotTitle

Plot title.

plotSubtitle

Plot subtitle.

plotCaption

Plot caption.

plotMessage

Plot message (e.g. sampling messages). Set an elementBlank() to show nothing. Set an elementText() to show sampling messages (elementText() options don't affect a message text).

plotMargin

Margin around entire plot. Margins around the text. The margin may be specified using a number or a list of numbers:

  • a number or list of one number - the same margin it applied to all four sides;

  • a list of two numbers - the first margin applies to the top and bottom, the second - to the left and right;

  • a list of three numbers - the first margin applies to the top, the second - to the right and left, the third - to the bottom;

  • a list of four numbers - the margins are applied to the top, right, bottom and left in that order. It is acceptable to use null for any side; in this case, the default side value for the plot margin side will be used.

plotInset

Inset for a plotting area, including the axes with their labels, but without titles. The inset may be specified using a number or a list of numbers:

  • a number or list of one number - the same inset it applied to all four sides;

  • a list of two numbers - the first inset applies to the top and bottom, the second - to the left and right;

  • a list of three numbers - the first inset applies to the top, the second - to the right and left, the third - to the bottom;

  • a list of four numbers - the insets are applied to the top, right, bottom and left in that order.

It is acceptable to use None for any side; in this case, the default value for the plot inset side will be used.

stripBackground

Background of facet labels.

stripText

Facet labels.

axisTooltip

Axes tooltips.

axisTooltipX

Axes tooltips.

axisTooltipY

Axes tooltips.

axisTooltipText

Text in axes tooltips.

axisTooltipTextX

Text in axes tooltips.

axisTooltipTextY

Text in axes tooltips.

tooltip

General tooltip.

tooltipText

Text in general tooltip.

tooltipTitleText

Tooltip title text.

labelText

Annotation text. Annotations are currently supported for pie and bar charts. Set elementText() to specify annotation text parameters: font family and face, text size, text color (relevant for a pie chart - for those annotations that are outside the pie).

geom

Geometry colors.

Constructors

Link copied to clipboard
constructor(exponentFormat: Any? = null, line: Any? = null, rect: Any? = null, text: Any? = null, title: Any? = null, axis: Any? = null, axisOntop: Boolean? = null, axisOntopX: Boolean? = null, axisOntopY: Boolean? = null, axisTitle: Any? = null, axisTitleX: Any? = null, axisTitleY: Any? = null, axisText: Any? = null, axisTextX: Any? = null, axisTextY: Any? = null, axisTicks: Any? = null, axisTicksX: Any? = null, axisTicksY: Any? = null, axisTicksLength: Number? = null, axisTicksLengthX: Number? = null, axisTicksLengthY: Number? = null, axisLine: Any? = null, axisLineX: Any? = null, axisLineY: Any? = null, legendBackground: Any? = null, legendText: Any? = null, legendTitle: Any? = null, panelBackground: Any? = null, panelBorder: Any? = null, panelBorderOntop: Boolean? = null, panelGrid: Any? = null, panelGridMajor: Any? = null, panelGridMinor: Any? = null, panelGridMajorX: Any? = null, panelGridMinorX: Any? = null, panelGridMajorY: Any? = null, panelGridMinorY: Any? = null, panelGridOntop: Boolean? = null, panelGridOntopX: Boolean? = null, panelGridOntopY: Boolean? = null, panelInset: Any? = null, plotBackground: Any? = null, plotTitle: Any? = null, plotSubtitle: Any? = null, plotCaption: Any? = null, plotMessage: Any? = null, plotMargin: Any? = null, plotInset: Any? = null, stripBackground: Any? = null, stripText: Any? = null, axisTooltip: Any? = null, axisTooltipX: Any? = null, axisTooltipY: Any? = null, axisTooltipText: Any? = null, axisTooltipTextX: Any? = null, axisTooltipTextY: Any? = null, tooltip: Any? = null, tooltipText: Any? = null, tooltipTitleText: Any? = null, labelText: Any? = null, geom: Any? = null)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun legendJustification(xanchor: Number, yanchor: Number): theme

Specifies the anchor point for positioning legend inside plot. Justification (0, 0) corresponds to the left, lower corner of the legend. Justification (1, 1) corresponds to the right, upper corner of the legend.

Link copied to clipboard
fun legendPosition(xpos: Number, ypos: Number): theme

Specifies the legend position relative to the plot drawing area. Position (0, 0) corresponds to the left, lower corner of the plot. Position (1, 1) corresponds to the right, upper corner of the plot.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard