Last active
December 22, 2015 04:29
-
-
Save Coornail/6417712 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
# Load and format data. | |
bb <- read.csv("bb.csv") | |
fr <- data.frame(idx=as.numeric(1:57), rating=bb$User.Rating, season=factor(bb$Season)) | |
# Print graph. | |
png("/tmp/bb.png", width=1280, height=768) | |
gplot(data=fr, aes(x=fr$idx, y=fr$rating, color=season)) + geom_point(size=3) + geom_smooth(aes(group=fr$season), method="lm") + labs(x="", y="User rating", color="Season", title="Breaking Bad episode rating") | |
dev.off() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment