| Title: | Themes for ggplot2 |
|---|---|
| Description: | Custom ggplot2 themes with custom fonts. |
| Authors: | Roy Francis [aut, cre] (ORCID: <https://orcid.org/0000-0001-8654-3580>) |
| Maintainer: | Roy Francis <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.3 |
| Built: | 2026-06-05 06:49:56 UTC |
| Source: | https://github.com/royfrancis/plummy |
Import font for use in ggplot2 graphs
import_barlow() import_inter() import_lato() import_nunito() import_plex()import_barlow() import_inter() import_lato() import_nunito() import_plex()
Lists all fonts and families.
list_fonts()list_fonts()
Returns a data.frame with name, family, font, weight and path. The name is used as 'family' when plotting.
10 color qualitative color palette from morris
palette_morris()palette_morris()
library(scales) scales::show_col(palette_morris()(10))library(scales) scales::show_col(palette_morris()(10))
8 color qualitative color palette from okabeito
palette_okabeito()palette_okabeito()
library(scales) scales::show_col(palette_okabeito()(8))library(scales) scales::show_col(palette_okabeito()(8))
17 color qualitative color palette from strong
palette_strong()palette_strong()
library(scales) scales::show_col(palette_strong()(17))library(scales) scales::show_col(palette_strong()(17))
20 color qualitative color palette from tableau
palette_tableau()palette_tableau()
library(scales) scales::show_col(palette_tableau()(20))library(scales) scales::show_col(palette_tableau()(20))
Custom ggplot2 theme
plummy(style = "grid", family = "", ...)plummy(style = "grid", family = "", ...)
style |
A theme style. Options are 'grid'. |
family |
A font family name. Options are 'barlow', 'inter', 'lato', 'nunito' and 'plex'. |
... |
Arguments passed to low level theme functions theme_style*_font*() |
See palette_morris().
scale_colour_morris(...) scale_color_morris(...) scale_fill_morris(...)scale_colour_morris(...) scale_color_morris(...) scale_fill_morris(...)
... |
Arguments passed on to
|
See palette_okabeito().
scale_colour_okabeito(...) scale_color_okabeito(...) scale_fill_okabeito(...)scale_colour_okabeito(...) scale_color_okabeito(...) scale_fill_okabeito(...)
... |
Arguments passed on to
|
See palette_strong().
scale_colour_strong(...) scale_color_strong(...) scale_fill_strong(...)scale_colour_strong(...) scale_color_strong(...) scale_fill_strong(...)
... |
Arguments passed on to
|
See palette_tableau().
scale_colour_tableau(...) scale_color_tableau(...) scale_fill_tableau(...)scale_colour_tableau(...) scale_color_tableau(...) scale_fill_tableau(...)
... |
Arguments passed on to
|
ggplot2 grid theme.
theme_grid_barlow(...) theme_grid( base_family = "", base_size = 10.5, scaling = 1.2, title_family = "", title_size = base_size * scaling^2, title_face = "bold", title_color = "#2e4053", title_margin = margin(b = 2), subtitle_family = "", subtitle_size = base_size * scaling, subtitle_face = "plain", subtitle_color = "#2e4053", subtitle_margin = margin(b = 6), strip_text_family = "", strip_text_size = base_size, strip_text_face = "bold", strip_text_color = "#2e4053", caption_family = "", caption_size = base_size/scaling, caption_face = "plain", caption_color = "#aeb6bf", caption_margin = margin(t = 10), axis_text_family = "", axis_text_face = "plain", axis_text_color = "#2e4053", axis_text_size = base_size/scaling, axis_title_family = "", axis_title_size = base_size/scaling, axis_title_face = "plain", axis_title_color = "#2e4053", axis_title_just = "rt", plot_margin = margin(20, 20, 20, 20), plot_title_position = "plot", plot_caption_position = "plot", grid_color = "#cccccc", grid = TRUE, axis_color = "#cccccc", axis = TRUE, ticks = FALSE, tsc_just = 0, leg = "v", leg_just = "center", base_theme = theme_minimal ) theme_grid_inter(...) theme_grid_lato(...) theme_grid_nunito(...) theme_grid_plex(...)theme_grid_barlow(...) theme_grid( base_family = "", base_size = 10.5, scaling = 1.2, title_family = "", title_size = base_size * scaling^2, title_face = "bold", title_color = "#2e4053", title_margin = margin(b = 2), subtitle_family = "", subtitle_size = base_size * scaling, subtitle_face = "plain", subtitle_color = "#2e4053", subtitle_margin = margin(b = 6), strip_text_family = "", strip_text_size = base_size, strip_text_face = "bold", strip_text_color = "#2e4053", caption_family = "", caption_size = base_size/scaling, caption_face = "plain", caption_color = "#aeb6bf", caption_margin = margin(t = 10), axis_text_family = "", axis_text_face = "plain", axis_text_color = "#2e4053", axis_text_size = base_size/scaling, axis_title_family = "", axis_title_size = base_size/scaling, axis_title_face = "plain", axis_title_color = "#2e4053", axis_title_just = "rt", plot_margin = margin(20, 20, 20, 20), plot_title_position = "plot", plot_caption_position = "plot", grid_color = "#cccccc", grid = TRUE, axis_color = "#cccccc", axis = TRUE, ticks = FALSE, tsc_just = 0, leg = "v", leg_just = "center", base_theme = theme_minimal ) theme_grid_inter(...) theme_grid_lato(...) theme_grid_nunito(...) theme_grid_plex(...)
... |
Arguments passed to |
base_family, base_size
|
Base: font family and size |
scaling |
Font size scaling factor |
title_family, title_face, title_color, title_size, title_margin
|
Plot title: font family, face, color, size and margin |
subtitle_family, subtitle_face, subtitle_color, subtitle_size, subtitle_margin
|
Plot subtitle: font family, face, color, size and margin |
strip_text_family, strip_text_face, strip_text_color, strip_text_size
|
Facet label: font family, face, color and size |
caption_family, caption_face, caption_color, caption_size, caption_margin
|
Plot caption: font family, face, color, size and margin |
axis_text_family, axis_text_face, axis_text_color
|
Axis text: font family, face and color |
axis_text_size |
Font size of axis text |
axis_title_family, axis_title_face, axis_title_color, axis_title_size
|
Axis title: font family, face, color and size |
axis_title_just |
Axis title font justification, one of |
plot_margin |
Plot margin |
plot_title_position |
Position of title/subtitle relative to panel ( |
plot_caption_position |
Position of caption relative to panel ( |
grid_color |
Grid color |
grid |
Panel grid ( |
axis_color |
Axis color |
axis |
Add x or y axes? |
ticks |
Adds ticks if |
tsc_just |
Horizontal justification for title, subtitle, caption. |
leg |
Legend position. "v" for regular vertical on the right. "h" for horizontal on top. |
leg_just |
Legend justification |
base_theme |
Base theme. Defaults to |
Specify margins using ggplot2::margin()
Update font family for geom_text and geom_label Note that this changes the default geom family for the whole session
update_geom_font(family = "")update_geom_font(family = "")
family |
A valid font family name |