Skip to contents

md(text) builds a rich-text label from a markdown subset: **bold**, *italic* / _italic_, ^superscript^, ~subscript~, a colour span [text]{#c00}, and inline math $...$ (see tex()). It is vellum::md(), re-exported. The result can be used anywhere vellumplot draws a title: labs() (title / subtitle / caption / tag / x / y / color) and scale_*(name = ). Per-element rich labels go in mark_text() as a list, one per row.

Details

text is a length-one markdown string; the result is a vellum_md_label object accepted by vellum::text_grob(). See vellum::md() for the full reference.

Examples

vplot(mtcars) |>
  mark_point(x = wt, y = mpg) |>
  labs(title = md("**Fuel** economy"), y = md("Efficiency (mi gal^-1^)"))