Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ggally_text

Text plot


Description

Plot text for a plot.

Usage

ggally_text(
  label,
  mapping = ggplot2::aes(color = "black"),
  xP = 0.5,
  yP = 0.5,
  xrange = c(0, 1),
  yrange = c(0, 1),
  ...
)

Arguments

label

text that you want to appear

mapping

aesthetics that don't relate to position (such as color)

xP

horizontal position percentage

yP

vertical position percentage

xrange

range of the data around it. Only nice to have if plotting in a matrix

yrange

range of the data around it. Only nice to have if plotting in a matrix

...

other arguments for geom_text

Author(s)

Barret Schloerke

Examples

# Small function to display plots only if it's interactive
p_ <- GGally::print_if_interactive

p_(ggally_text("Example 1"))
p_(ggally_text("Example\nTwo", mapping = ggplot2::aes(size = 15), color = I("red")))

GGally

Extension to 'ggplot2'

v2.1.1
GPL (>= 2.0)
Authors
Barret Schloerke [aut, cre], Di Cook [aut, ths], Joseph Larmarange [aut], Francois Briatte [aut], Moritz Marbach [aut], Edwin Thoen [aut], Amos Elberg [aut], Ott Toomet [ctb], Jason Crowley [aut], Heike Hofmann [ths], Hadley Wickham [ths]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.