Skip to content

Instantly share code, notes, and snippets.

@cdesante
Created October 23, 2012 18:26
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 cdesante/3940571 to your computer and use it in GitHub Desktop.
Save cdesante/3940571 to your computer and use it in GitHub Desktop.
color2
Con1 <- ggplot(data = DF) + geom_pointrange(aes(x = year, y = means,
ymin = lows, ymax = highs, colour=factor(dems)) )
Con1 <- Con1 + ylim(0.5,2.5) + labs(title="geom_pointrange")
Con1
Con2 <- ggplot(data = DF) + geom_errorbar(aes(x = year, y = means,
ymin = lows, ymax = highs, colour=factor(dems), width=.5) )
Con2 <- Con2 + ylim(0.5,2.5) + labs(title="geom_errorbar, width=.5")
Con2
Con3 <- ggplot(data = DF) + geom_errorbar(aes(x = year, y = means,
ymin = lows, ymax = highs, colour=factor(dems), width=.75), lty=2 )
Con3 <- Con3 + ylim(0.5,2.5) + labs(title="geom_errorbar, width=.75, lty=2")
Con3
Con4 <- ggplot(data = DF) + geom_errorbar(aes(x = year, y = means,
ymin = lows, ymax = highs, colour=factor(dems)), size=1.5, lty=1 )
Con4 <- Con4 + ylim(0.5,2.5) + labs(title="geom_errorbar, size=1.5, lty=1")
Con4
MfrowGG <- grid.arrange(Con1, Con2, Con3, Con4, ncol=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment