Last active
March 5, 2018 14:05
-
-
Save privefl/5a66f89b8b32e32983069d5d09d2fdff to your computer and use it in GitHub Desktop.
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
MY_THEME <- function(p, coeff = 1) { | |
p + theme_bw() + | |
theme(plot.title = element_text(size = rel(2.0 * coeff), hjust = 0.5), | |
plot.subtitle = element_text(size = rel(1.5 * coeff), hjust = 0.5), | |
legend.title = element_text(size = rel(1.8 * coeff)), | |
legend.text = element_text(size = rel(1.3 * coeff)), | |
axis.title = element_text(size = rel(1.5 * coeff)), | |
axis.text = element_text(size = rel(1.2 * coeff)), | |
legend.key.height = unit(1.3 * coeff, "line"), | |
legend.key.width = unit(1.3 * coeff, "line")) | |
} | |
myggplot <- function(..., coeff = 1) { | |
MY_THEME(ggplot2::ggplot(...), coeff = coeff) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment