Created
May 2, 2014 04:26
-
-
Save johnschrom/aaead8439ae095b70c44 to your computer and use it in GitHub Desktop.
Chart plot formats with ggplot2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(grid) | |
ggplot(data, aes(x=x, y=y)) + | |
geom_point() + | |
# geom_line() + | |
ylab('y label') + | |
xlab('x label') + | |
theme_bw() + | |
scale_color_manual(values = c('#023F8A', '#BF4D28')) + | |
theme(legend.position = 'none') + | |
# theme(legend.position=c(0.88,0.88), legend.background = element_rect(colour=NA), legend.title = element_blank()) + | |
theme(axis.title.x=element_text(size=16, family='Open Sans Light', vjust=0)) + | |
theme(axis.title.y=element_text(size=16, family='Open Sans Light', vjust=0)) + | |
theme(axis.text.x = element_text(size=12, family='Open Sans Light')) + | |
theme(axis.text.y = element_text(size=12, family='Open Sans Light')) + | |
theme(plot.margin = unit(7,7,7,7), 'mm') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment