Skip to content

Instantly share code, notes, and snippets.

@msund
Created December 25, 2014 07:35
Show Gist options
  • Save msund/b823f4df1e7dacf4c1a4 to your computer and use it in GitHub Desktop.
Save msund/b823f4df1e7dacf4c1a4 to your computer and use it in GitHub Desktop.
Quartet
install.packages("devtools") # so we can install from github
library("devtools")
install_github("ropensci/plotly") # plotly is part of ropensci
library(plotly)
py <- plotly(username="r_user_guide", key="mw5isa4yqp") # open plotly connection
library(ggplot2)
anscombe_m <- data.frame()
for(i in 1:4)
anscombe_m <- rbind(anscombe_m, data.frame(set=i, x=anscombe[,i], y=anscombe[,i+4]))
ggplot(anscombe_m, aes(x, y)) + geom_point() + facet_wrap(~set, ncol=2)
py$ggplotly()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment