Giter Club home page Giter Club logo

ggannotate's Introduction

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.)

ggannotate's People

Contributors

mattcowgill avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.