View source: R/add-annotation.R
add_annotation_text | R Documentation |
Add annotation
add_annotation_text(plot, text, x, y, fontsize = 7)
add_annotation_rectangle(
plot,
xmin,
xmax,
ymin,
ymax,
fill = "#000000",
color = NA,
alpha = 0.1
)
add_annotation_line(plot, x, xend, y, yend, color = "#000000")
plot |
A |
text |
Here goes the description. |
x , xmin , xmax , xend , y , ymin , ymax , yend |
Here goes the description. |
fontsize |
Font size in points. Defaults to |
fill |
A hex color for the fill color. For example, |
color |
A hex color for the stroke color. For example, |
alpha |
A |
A tidyplot
object.
study |>
tidyplot(x = treatment, y = score, color = treatment) |>
add_boxplot() |>
add_annotation_text("Look here!", x = 2, y = 25)
eu_countries |>
tidyplot(x = area, y = population) |>
add_data_points() |>
add_annotation_rectangle(xmin = 2.5e5, xmax = Inf, ymin = 42, ymax = Inf)
eu_countries |>
tidyplot(x = area, y = population) |>
add_data_points() |>
add_annotation_rectangle(xmin = 2.5e5, xmax = 6e5, ymin = 42, ymax = 90,
color = "#E69F00", fill = NA)
eu_countries |>
tidyplot(x = area, y = population) |>
add_data_points() |>
add_annotation_line(x = 0, xend = Inf, y = 0, yend = Inf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.