elementText

fun elementText(color: Any? = null, family: Any? = null, face: Any? = null, size: Number? = null, angle: Number? = null, hjust: Number? = null, vjust: Number? = null, margin: Any? = null, blank: Boolean = false): <Error class: unknown class>

Specifies how non-data components of the plot are drawn. This theme element draws texts.

Examples

Parameters

color

Text color. Accepts color core as string (HEX or rgb) or Color object.

family

Font family.

face

Font face ("plain", "italic", "bold", "bold_italic").

size

Text size in pt.

angle

Angle to rotate the text (in degrees).

hjust

Horizontal justification (in [0, 1]).

  • 0 - left-justified

  • 1 - right-justified

  • 0.5 - center-justified Can be used with values out of range, but behaviour is not specified.

vjust

Vertical justification (in [0, 1]).

  • 0 - bottom-justified

  • 1 - top-justified

  • 0.5 - middle-justified Can be used with values out of range, but behaviour is not specified.

margin

Margins around the text. 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 this element will be used.

blank

Mark as a 'blank' element.