Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

ggannotate

Build Status Lifecycle Codecov test coverage CRAN status

Overview

ggannotate is a point-and-click tool to help you put your annotations exactly where you want them to go.

With ggannotate, you interactively annotate ggplots using a Shiny-based RStudio add-in.

Lifecycle

This package is still in an 'experimental' phase. Features are still being added, and the user interface has not yet been finalised. Feedback and suggestions are welcome, via GitHub issue or email to mattcowgill at gmail dot com.

Installation

Install from GitHub:

remotes::install_github("mattcowgill/ggannotate")

Usage

There are three ways to use ggannotate:

  1. Select some ggplot2 code in RStudio, then invoke the ggannotate addin via RStudio’s Addins menu.

  2. Create a ggplot2 object, then call ggannotate(), like this:

library(ggplot2)
p <- ggplot(mtcars, 
            aes(x = wt, y = mpg)) + 
  geom_point() 

ggannotate::ggannotate(p)
  1. Wrap some code that creates a ggplot2 object in ggannotate(), like this:
ggannotate::ggannotate(ggplot(mtcars, 
                              aes(x = wt, y = mpg)) + 
                         geom_point())

Each of these options will launch a Shiny app. Choose what type of annotation you want, click to place it in the right place, and click ‘copy code’ to copy the annotation code to the clipboard. Then paste the copied code in your script and you’re done!

You can adjust the size of the plot in the Shiny app so you can set it to be the same as your intended output. You can keep repeat the process to add multiple annotations (this will get easier in later versions.)

About

Interactively annotate ggplots

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.