theme_jam | R Documentation |
Jam default theme for ggplot2
theme_jam(
theme_default = ggplot2::theme_bw,
base_size = 18,
grid.major.size = 0.5,
grid.minor.size = 0.25,
strip.background.colour = "grey30",
strip.background.fill = "lightgoldenrod1",
strip.text.size = ggplot2::rel(0.8),
panel.grid.major.colour = "grey80",
panel.grid.minor.colour = "grey90",
panel.background = ggplot2::element_rect(fill = "white", colour = NA),
panel.border = ggplot2::element_rect(fill = NA, colour = "grey15"),
axis.text.x.angle = 60,
blankGrid = FALSE,
blankXgrid = FALSE,
blankYgrid = FALSE,
resetTheme = TRUE,
verbose = FALSE,
...
)
theme_default |
|
base_size |
|
grid.major.size , grid.minor.size |
|
strip.background.colour , strip.background.fill |
|
strip.text.size |
|
panel.grid.major.colour , panel.grid.minor.colour |
|
panel.background , panel.border |
|
axis.text.x.angle |
|
blankGrid , blankXgrid , blankYgrid |
|
resetTheme |
|
verbose |
|
... |
additional arguments are passed to |
This function applies some default theme settings to ggplot2, mainly taking away the default grey newspaper background color, also rotates the x-axis label text to 60 degrees, to accomodate longer labels without overlaps.
Other colorjam ggplot2:
jam_pal()
,
scale_color_jam()
,
scale_fill_jam()
if (jamba::check_pkg_installed("ggplot2")) {
dsamp <- ggplot2::diamonds[sample(nrow(ggplot2::diamonds), 1000),];
d <- ggplot2::ggplot(dsamp,
ggplot2::aes(carat, price)) +
ggplot2::geom_point(
ggplot2::aes(colour=cut),
size=2);
print(d + scale_color_jam() + ggplot2::ggtitle("scale_color_jam()"));
print(d + scale_color_jam() + theme_jam() + ggplot2::ggtitle("scale_color_jam() + theme_jam()"));
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.