gglabelr: Interactively make a label for a ggplot.

Description Usage Arguments Examples

View source: R/gglabelr.R

Description

When called, this function opens a window with options to interactively annotate a ggplot. You can add a label and / or add a bounding box. You can also view and copy the code to generate the annotations. When you press the "done" button, the code to generate the annotations will be printed to the console.

Usage

1

Arguments

p

A ggplot object.

Examples

1
2
3
4
5
6
7
8
9
library(gglabelr)
library(ggplot2)

# Make plot
p <- ggplot(mpg, aes(x = hwy, y = displ)) +
    geom_point()

# Interactively annotate the plot
gglabelr(p)

jhelvy/gglabelr documentation built on Dec. 7, 2020, 11:56 a.m.