Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 1.85 KB

README-old.org

File metadata and controls

66 lines (50 loc) · 1.85 KB

Motivation

A wide variety of plots can be defined in R code using library(ggplot2). The plot.ly web app is for sharing interactive plots, and can be used from R via library(plotly). Now, ggplots can be uploaded to plotly using library(ggplotly).

install.packages("devtools")
library(devtools)
install_github("plotly", "ropensci")
library(ggplotly)
example(ggplotly)

The example will give you an error if you have not already created a ggplotly interface object:

p <- plotly::plotly("YOUR_USERNAME", "YOUR_KEY")

Note that you can put the code above in your ~/.Rprofile if you want to avoid having to type your plotly name/key every session.

Features

The mission of the ggplotly package is to make it as easy as possible to go from a ggplot on your computer to an interactive, sharable plot on plot.ly. We would like to support all plots shown on the ggplot2 documentation web site, except for those which are known (as of 6 March 2014) to be unsupported by plot.ly:

  • contours
  • violin plots
  • horizontal error bars
  • hexagon binning
  • geom crossbar

The NEWS file contains a list of TODOs that we will eventually implement. If you have a feature request that does not appear on that list, feel free to file an issue or pull request.

Development

Contributions are welcome! After forking and changing the code, please

  • add some relevant tests,
  • change the Version line in the DESCRIPTION file to the current date,
  • describe your changes in the NEWS file,

and finally re-build the package and make sure R CMD check shows no errors nor warnings. In R:

install.packages("roxygen2")
library(roxygen2)
roxygenize("ggplotly")

Then in the shell:

R CMD build ggplotly
R CMD check ggplotly_xx.yy.zz.tar.gz