Skip to content

Instantly share code, notes, and snippets.

@allenaven
Last active September 21, 2017 17:09
Show Gist options
  • Save allenaven/7489113 to your computer and use it in GitHub Desktop.
Save allenaven/7489113 to your computer and use it in GitHub Desktop.
Improve the standard ggplot2 plot! Increase text size, get rid of the grey background!!!
## library(devtools)
## source_gist(7489113)
## use like this: ggplot(mtcars, aes(x=hp, y=mpg)) + geom_point(aes(col=factor(cyl)), size=3) + t1
t1 <- theme(
plot.background = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.border = element_blank(),
panel.background = element_blank(),
axis.line = element_line(size=0.5),
axis.ticks = element_line(size=0.5),
axis.text = element_text(color='black', size=14),
axis.title.x = element_text(face="bold", color="black", size=16),
axis.title.y = element_text(face="bold", color="black", size=16),
plot.title = element_text(face="bold", color = "black", size=18)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment