Created
March 10, 2016 15:34
-
-
Save cavedave/779fa728bc1809f6d8df 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
#Package Wes Anderson colours R package https://github.com/karthik/wesanderson#wes-anderson-palettes | |
#His Box Office http://www.boxofficemojo.com/people/chart/?id=wesanderson.htm | |
#His IMDB http://www.imdb.com/name/nm0027572/ | |
# wes csv is | |
#Name,IMDB,Earn,Year,Era | |
#The Grand Budapest Hotel,8.1,62,2014,later | |
#Moonrise Kingdom,7.8,50,2012,later | |
#Fantastic Mr. Fox,7.8,23,2009,mid | |
#The Darjeeling Limited,7.2,15,2007,mid | |
#The Life Aquatic with Steve Zissou,7.3,33,2004,mid | |
#The Royal Tenenbaums,7.6,78,2001,early | |
#Rushmore,7.7,29,1998,early | |
#Bottle Rocket,7.1,1,1996,early | |
install.packages("wesanderson") | |
library(wesanderson) | |
library(ggplot2) | |
mydata = read.csv("wes.csv", header=TRUE, sep=",") # read csv file | |
ggplot(mydata, aes(IMDB, Earn, color = Era)) + | |
geom_point(size = 3) + | |
scale_color_manual(values = wes_palette("GrandBudapest")) + | |
theme_gray()+ ggtitle("Wes Anderson Films\n")+ylab("Earn Millions $")+xlab("IMDB Rating")+ | |
geom_text(aes(label=Name),hjust=0.4, vjust=-.8) | |
ggsave("plot.png", width=12, height=10, dpi=200) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment