element_markdown

0th

Percentile

Theme element that enables markdown text.

Theme element that enables markdown text.

Usage
element_markdown(
  family = NULL,
  face = NULL,
  size = NULL,
  colour = NULL,
  fill = NULL,
  box.colour = NULL,
  linetype = NULL,
  linewidth = NULL,
  hjust = NULL,
  vjust = NULL,
  halign = NULL,
  valign = NULL,
  angle = NULL,
  lineheight = NULL,
  margin = NULL,
  padding = NULL,
  r = NULL,
  color = NULL,
  box.color = NULL,
  align_widths = NULL,
  align_heights = NULL,
  rotate_margins = NULL,
  debug = FALSE,
  inherit.blank = FALSE
)
Arguments
family

Font family

face

Font face

size

Font size

colour, color

Text color

fill

Fill color of the enclosing box

box.colour, box.color

Line color of the enclosing box (if different from the text color)

linetype

Line type of the enclosing box (like lty in base R)

linewidth

Line width of the enclosing box (measured in mm, just like size in ggplot2::element_line()).

hjust

Horizontal justification

vjust

Vertical justification

halign

Horizontal justification

valign

Vertical justification

angle

Angle (in degrees)

lineheight

Line height

padding, margin

Padding and margins around the text box. See gridtext::richtext_grob() for details.

r

Unit value specifying the corner radius of the box

align_widths, align_heights

Should multiple elements be aligned by their widths or height? See gridtext::richtext_grob() for details.

rotate_margins

Should margins get rotated in frame with rotated text? If TRUE, the margins are applied relative to the text direction. If FALSE, the margins are applied relative to the plot direction, i.e., the top margin, for example, is always placed above the text label, regardless of the direction in which the text runs. The default is FALSE, which mimics the behavior of element_text().

debug

Draw a debugging box around each label

inherit.blank

See ggplot2::margin() for details.

Value

A ggplot2 theme element that can be used inside a ggplot2::theme() call.

See Also

gridtext::richtext_grob(), element_textbox(), geom_richtext()

Aliases
  • element_markdown
Documentation reproduced from package ggtext, version 0.1.0, License: GPL-2

Community examples

Looks like there are no examples yet.