Last active
June 7, 2021 15:19
-
-
Save jrnold/79d76e927386298688c9 to your computer and use it in GitHub Desktop.
Changing axis title and text size in ggplot with theme_economist
This file contains hidden or 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
| p <- ggplot(mtcars) + geom_point(aes(x = wt, y = mpg, | |
| colour=factor(gear))) + | |
| facet_wrap(~am) | |
| # Change the size of axis titles to be 2 x that of the default text size using function rel | |
| # Change the size of the axis text to be 8 pt | |
| p + theme_economist() + scale_colour_economist() + | |
| theme(axis.title = element_text(size = rel(2)), | |
| axis.text = element_text(size = 8) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Final line missing a closing ')'