Description Usage Arguments Examples
Theme to produce plots that play nicely with the poster templates for the MPI for Psycholinguistics corporate identity.
There is another version available, theme_mpinl_general
, with text sizes for other purposes.
This theme can be appended to a ggplot2 plot object.
The theme is intended to be used in combination with scale_colour_discrete_mpi_nl
and scale_fill_discrete_mpi_nl
to use the recommended colour scheme. For continuous colour scales, we recommend scale_color_viridis
.
It shouldn't be necessary to tweak the further. You might wish to use additional + theme() calls to further customise the appearance of your plots, for instance to control the placement of the legend.
#' For more details see the poster making vignette:
vignette("make-a-poster", package = "mpinltheme
")
1 |
base_size |
base font size |
base_family |
base font family |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | mtcars2 <- within(mtcars, {
vs <- factor(vs, labels = c("V-shaped", "Straight"))
am <- factor(am, labels = c("Automatic", "Manual"))
cyl <- factor(cyl)
gear <- factor(gear)
})
library(ggplot2)
library(mpinltheme)
p1 <- ggplot(mtcars2) +
geom_point(aes(x = wt, y = mpg, colour = gear)) +
labs(title = "Fuel economy declines as weight increases",
subtitle = "(1973-74)",
x = "Weight (1000 lbs)",
y = "Fuel economy (mpg)",
colour = "Gears")
p1 + scale_colour_discrete_mpinl() + theme_mpinl_poster()
ggsave_mpinl_poster_portrait("outputfilename.pdf")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.