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

xgx_annotate_status

Create a status (e.g. DRAFT) annotation layer


Description

xgx_annotate_status adds a status (e.g. DRAFT) annotation layer to a plot. The text of the annotation can be customized, the default is "DRAFT". The color, location, size, fontface, transparency of the annotation can also be customized.

Usage

xgx_annotate_status(
  status = "DRAFT",
  x = Inf,
  y = Inf,
  color = "grey",
  hjust = 1.2,
  vjust = 1.2,
  fontsize = 7,
  fontface = "bold",
  alpha = 0.5,
  ...
)

Arguments

status

the text to

x

x location, default Inf (right most point)

y

y location, default Inf (up most point)

color

font color, default "grey"

hjust

horizontal justification, default 1.2

vjust

vertical justification, default 1.2

fontsize

font size to use, default 7

fontface

font style to use, default "bold"

alpha

transparency, default is 0.5

...

other arguments passed on to layer

Value

ggplot layer

Examples

data <- data.frame(x = 1:1000, y = rnorm(1000))
ggplot2::ggplot(data = data, ggplot2::aes(x = x, y = y)) + 
  ggplot2::geom_point() +
  xgx_annotate_status("DRAFT")

xgxr

Exploratory Graphics for Pharmacometrics

v1.1.1
MIT + file LICENSE
Authors
Andrew Stein [aut, cre], Alison Margolskee [aut], Fariba Khanshan [aut], Konstantin Krismer [aut] (<https://orcid.org/0000-0001-8994-3416>), Matthew Fidler [ctb] (<https://orcid.org/0000-0001-8538-6691>), Novartis Pharma AG [cph, fnd]
Initial release

We don't support your browser anymore

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