Description Usage Arguments Value Installing and Using Lato Examples
theme_pub
is a minimal yet flexible ggplot2 theme designed to put
the data front and center for scientific publicaions. It uses the Calibri font.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | theme_pub(base_family = "sans", base_size = 12, base_color = "black",
line_size = 0.2, baseline = TRUE, baseline.x = baseline,
baseline.y = baseline, baseline.size = line_size * 3,
background.color = "white", panel.border = FALSE,
panel.border.size = line_size * 2, legend.box = FALSE,
grid = FALSE, grid.minor = grid, grid.x = grid, grid.y = grid,
grid.minor.x = grid.minor, grid.minor.y = grid.minor,
grid.color = "black", ticks = TRUE, ticks.x = ticks,
ticks.y = ticks, title.family = "sans", title.face = "bold",
title.color = "black", subtitle.family = base_family,
subtitle.face = "plain", subtitle.color = "black",
caption.family = base_family, caption.face = "italic",
caption.color = "black", axis.title.family = base_family,
axis.title.face = "plain", axis.title.color = base_color,
axis.text.family = base_family, axis.text.face = "plain",
axis.text.color = "black", legend.title.family = axis.title.family,
legend.title.face = axis.title.face,
legend.title.color = axis.title.color,
legend.text.family = axis.text.family,
legend.text.face = axis.text.face,
legend.text.color = axis.text.color, aspect.ratio = NULL)
|
base_family |
Base font family (default: |
base_size |
Base font size (default: |
base_color |
Base font color (default: |
line_size |
Base line size for grid, panel (default: |
baseline |
Whether or not to show baselines on axes (default: |
baseline.x |
Whether or not to show baselines on X axis (default: same as |
baseline.y |
Whether or not to show baselines on X axis (default: same as |
baseline.size |
Size of axis baseline (default: |
background.color |
Background color (default: |
panel.border |
Whether or not to draw a border around panels (default: |
panel.border.size |
Size of panel border (default: |
legend.box |
Whether or not to draw box around legend (default: |
grid |
Whether or not to show grid lines (default: |
grid.minor |
Whether or not to show minor grid lines (default: same as |
grid.x |
Whether or not to show grid lines on X axis (default: same as |
grid.y |
Whether or not to show grid lines on Y axis (default: same as |
grid.minor.x |
Whether or not to show minor grid lines on X axis (default: same as |
grid.minor.y |
Whether or not to show minor grid lines on Y axis (default: same as |
grid.color |
Color for the grid, ticks, baseline, and legend box (default: |
ticks |
Whether or not to show axis tick marks (default: |
ticks.x |
Whether or not to show X axis tick marks (default: same as |
ticks.y |
Whether or not to show Y axis tick marks (default: same as |
title.family |
Font family for plot title (default: |
title.face |
Font face for plot title (default: |
title.color |
Color of plot title (default: |
subtitle.family |
Font family for plot subtitle (default: |
subtitle.face |
Font face for plot subtitle (default: |
subtitle.color |
Color of plot subtitle (default: |
caption.family |
Font family for plot caption (default: |
caption.face |
Font face for plot caption (default: |
caption.color |
Color of plot title (default: |
axis.title.family |
Font family for axis titles (default: |
axis.title.face |
Font face for axis titles (default: |
axis.title.color |
Color of axis titles (default: |
axis.text.family |
Font family for axis text (default: |
axis.text.face |
Font face for axis text (default: |
axis.text.color |
Color of axis text (default: |
legend.title.family |
Font family for legend title (default: |
legend.title.face |
Font face for legend title (default: |
legend.title.color |
Color of legend title (default: |
legend.text.family |
Font family for legend text (default: |
legend.text.face |
Font face for legend title (default: |
legend.text.color |
Color of legend text (default: |
aspect.ratio |
Aspect ratio for panels (no default) |
A named list containing ggplot2 theme information
Before using this theme, you must
extrafont::font_import() extrafont::loadfonts()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
library(ggplot2)
library(ggbluebadge)
ggplot(mtcars, aes(wt, mpg, color = as.factor(cyl) )) +
facet_grid(cyl ~ .) +
geom_line() +
geom_point() +
scale_color_hue(name = "# Cylinders") +
labs(
x = "Weight (tons)",
y = "Fuel Efficiency (mpg)",
title = "Just Buy a Convertible",
subtitle = "Lighter cars are more efficient. Shave off some weight by\nditching the roof, and drive your savings to the bank!",
caption = "Source: Motor Trend"
) +
theme_csiro()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.