Description Usage Arguments Value Examples
set_mms_ggplot2_theme
is a wrapper to set a standard custom
theme
for all of our output plots. It contains
only the necessary parameters we require to change in the
theme
function, and takes the remaining arguments
as the default values.
1 2 3 4 5 6 7 8 9 | set_mms_ggplot2_theme(
ggplot_obj,
axis_text_size = 17,
axis_title_size = 17,
strip_text_x_size = 17,
legend_text_size = 17,
legend_title_size = 17,
legend_position = "bottom"
)
|
ggplot_obj |
A |
axis_text_size |
A positive integer to define the the size of the
x and y axis text in the |
axis_title_size |
A positive integer to define the the size of the
x and y axis title text in the |
strip_text_x_size |
A positive integer to define the the size of the
facet labels text in the |
legend_text_size |
A positive integer to define the the size of the
legend text in the |
legend_title_size |
A positive integer to define the the size of the
legend title text in the |
legend_position |
A character value the position of legends ("none", "left", "right", "bottom", "top", or two-element numeric vector) |
(ggplot2
) : A ggplot2
object with the custom theme
applied
1 2 3 4 5 6 7 8 9 | ## Not run:
library(ggplot2)
p1 <- ggplot2::ggplot(mtcars, aes(x = wt, y = mpg, size = disp)) +
ggplot2::geom_point()
# Set the theme for a ggplot2 object with the default options
out <- p1 %>% maars::set_mms_ggplot2_theme(ggplot_obj = .)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.