Skip to content

Instantly share code, notes, and snippets.

@pbiecek
Created June 17, 2015 20:32
Show Gist options
  • Save pbiecek/f1dfa679168b4069123e to your computer and use it in GitHub Desktop.
Save pbiecek/f1dfa679168b4069123e to your computer and use it in GitHub Desktop.
ggplot(elections1, aes(x=daysToElections, y=support)) +
geom_point(aes(shape=source, color=candidate), size=4) +
scale_shape_manual(values=LETTERS) + theme_bw() + xlab("days to elections") + ylab("support (%)") +
scale_y_continuous(limits=c(10,75), breaks=seq(10,70,10)) +
geom_smooth(size=2,aes(color=candidate),se=FALSE, method="lm") +
scale_color_manual(values=c("blue3", "orange3"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment