Skip to content

Instantly share code, notes, and snippets.

@javieroot
Forked from allenaven/ggplot2_IMPROVE.R
Last active November 11, 2017 20:32
Show Gist options
  • Save javieroot/eb459842b629f2dce903c2e3c5128f3b to your computer and use it in GitHub Desktop.
Save javieroot/eb459842b629f2dce903c2e3c5128f3b 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)
)
# Probar si se puede agregar:
# + scale_y_continuous(labels = scales::comma)
# para las cantidades es en miles.. pero no aparezca el separador en la etiquetas (las comas)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment