Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.