theme_kyle | R Documentation |
Custom ggplot2 theme
theme_kyle(
base_size = 12,
axes = "bl",
grid = "hv",
grid_minor = "",
legend = "right",
map = FALSE,
scale = 1.125,
...
)
base_size |
The base_size of the font. Title, axis text, etc. all adjust to base_size. Default is 14. |
axes |
A string indicating which axes should have lines and ticks. Specify which axes to show by including the matching characters in the string: "t" for top, "r" for right, "b" for bottom, "l" for left. You will need to ensure this argument is consistent with the axes settings in your plot for the lines and ticks to be displayed. The default is an empty string, meaning ticks and lines for the bottom and left axes are shown by default. |
grid |
A string indicating which gridlines should be shown. Specify the gridlines to show by including the matching characters in the string: "h" for horizontal, "v" for vertical. The default is "hv", meaning both gridlines are shown by default. |
grid_minor |
A string indicating which gridlines should be shown. Specify
the gridlines to show by including the matching characters in the string:
"h" for horizontal, "v" for vertical. The default takes the value of
|
legend |
Either "top", "bottom", or "right". |
map |
Logical. If true, clear axes and plot for maps.
Could alternatively add |
scale |
logical. |
... |
Additional options passed to |
A (complete) ggplot2 theme
ggplot2::ggplot(mtcars) +
ggplot2::geom_point(ggplot2::aes(x = mpg, y = hp)) +
theme_kyle(base_size = 18)
ggplot2::ggplot(mtcars) +
ggplot2::geom_point(ggplot2::aes(x = mpg, y = hp)) +
ggplot2::facet_wrap(~cyl) +
ggplot2::labs(
title = "mtcars Dataset",
x = "Miles per Gallon", y = "Horsepower"
) +
theme_kyle(base_size = 18)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.