Skip to content

Instantly share code, notes, and snippets.

@sriyoda
Created February 1, 2016 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sriyoda/0215caff3f02ef234a4b to your computer and use it in GitHub Desktop.
Save sriyoda/0215caff3f02ef234a4b to your computer and use it in GitHub Desktop.
ggplot(data=movies[movies$year %in% c(1992,1998,2010,2015),]) +
geom_smooth(aes(domestic, overseas, color=factor(year)), se=F, method = lm) +
geom_point(aes(domestic, overseas, color=factor(year)))+scale_color_discrete(name='Year') +
ggtitle("Domestic vs Foreign Revenue") +
xlab("Domestic Revenue (dollars)") +
ylab("Overseas Revenue (dollars)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment