Learn R Programming

ggblanket (version 7.0.0)

weave_annotate_defaults: Update a series of annotate defaults

Description

Update a series of geom defaults commonly used for annotation (i.e. *_vline, *_hline, *_abline, *_curve, *_text and *_label).

Usage

weave_annotate_defaults(colour = lightness[2])

Value

Updated annotation geom defaults

Arguments

colour

A hex colour. Defaults to lightness[2].

Examples

Run this code
library(ggplot2)
library(ggblanket)
library(palmerpenguins)

set_blanket()
weave_annotate_defaults("#bc5090")

penguins |>
  gg_point(
    x = flipper_length_mm,
    y = body_mass_g,
    x_breaks = scales::breaks_pretty(3),
  ) +
  geom_vline(xintercept = 200) +
  annotate("text", x = I(0.25), y = I(0.75), label = "Here")

Run the code above in your browser using DataLab