| Title: | Publication-Quality 'ggplot2' Themes |
| Version: | 0.5.0 |
| Description: | Complete themes for publication-quality 'ggplot2' visualisation. Also provides functions to modify these based on the positional axis scales and orientation of a particular plot. |
| License: | MIT + file LICENSE |
| URL: | https://github.com/davidhodge931/ggrefine, https://davidhodge931.github.io/ggrefine/ |
| BugReports: | https://github.com/davidhodge931/ggrefine/issues |
| Depends: | R (≥ 4.1.0) |
| Imports: | blends, flexoki, ggplot2 (≥ 4.0.0), grid, jumble, rlang, scales, viridis |
| Suggests: | knitr, patchwork, rmarkdown, spelling |
| Encoding: | UTF-8 |
| Language: | en-GB |
| Config/roxygen2/version: | 8.0.0 |
| NeedsCompilation: | no |
| Packaged: | 2026-07-07 04:37:20 UTC; david |
| Author: | David Hodge |
| Maintainer: | David Hodge <davidhodge931@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-07-07 05:00:02 UTC |
Classic drift refine
Description
Removes axis ticks on discrete axes. Removes panel gridlines on the orientation axis only when at least one axis is discrete.
Usage
classic_drift(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
Classic drop refine
Description
Removes axis ticks on discrete axes and removes all panel gridlines.
Usage
classic_drop(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
Classic flow refine
Description
Removes axis ticks on discrete axes and removes panel gridlines on the orientation axis.
Usage
classic_flow(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
Classic keep refine
Description
Removes axis ticks on discrete axes and leaves panel gridlines unchanged.
Usage
classic_keep(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
Minimal drift refine
Description
Removes all axis lines, ticks, and minor ticks. Removes panel gridlines on the orientation axis only when at least one axis is discrete.
Usage
minimal_drift(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
Minimal drop refine
Description
Removes all axis lines, ticks, and minor ticks. Removes all panel gridlines.
Usage
minimal_drop(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
Minimal flow refine
Description
Removes all axis lines, ticks, and minor ticks. Removes panel gridlines on the orientation axis.
Usage
minimal_flow(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
Minimal keep refine
Description
Removes all axis lines, ticks, and minor ticks. Panel gridlines are left unchanged.
Usage
minimal_keep(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
Modern drift refine
Description
Removes axis lines, ticks, and minor ticks from the non-orientation axis. Axis ticks on discrete axes are removed. Removes panel gridlines on the orientation axis only when at least one axis is discrete.
Usage
modern_drift(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
Modern drop refine
Description
Removes axis lines, ticks, and minor ticks from the non-orientation axis. Axis ticks on discrete axes are removed. Removes all panel gridlines.
Usage
modern_drop(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
Modern flow refine
Description
Removes axis lines, ticks, and minor ticks from the non-orientation axis. Axis ticks on discrete axes are removed. Removes panel gridlines on the orientation axis.
Usage
modern_flow(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
Modern keep refine
Description
Removes axis lines, ticks, and minor ticks from the non-orientation axis. Axis ticks on discrete axes are removed. Panel gridlines are left unchanged.
Usage
modern_keep(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
theme_dark——————————————————————
Description
A complete theme for a dark plot and panel background. The plot
background defaults to "black", and the panel grid colour defaults to
plot_background_fill.
Usage
theme_dark(
...,
text_size = 10,
text_family = "",
text_colour = flexoki::flexoki$base["base200"],
title_size = NULL,
title_family = NULL,
title_colour = NULL,
subtitle_size = NULL,
subtitle_family = NULL,
subtitle_colour = NULL,
caption_size = NULL,
caption_family = NULL,
caption_colour = NULL,
caption_hjust = 0,
legend_place = "right",
legend_axis_line_colour = NULL,
legend_axis_line_linewidth = NULL,
legend_background_fill = NULL,
legend_key_fill = NULL,
legend_ticks_colour = NULL,
legend_ticks_linewidth = NULL,
legend_ticks_length = grid::unit(c(2.75, 0), "pt"),
axis_line_colour = NULL,
axis_line_linewidth = 0.2,
axis_ticks_colour = NULL,
axis_ticks_linewidth = NULL,
axis_ticks_length = grid::unit(3.66, "pt"),
panel_background_fill = flexoki::flexoki$base["base950"],
panel_grid_colour = NULL,
panel_grid_linetype = 1,
panel_grid_linewidth = 1,
panel_grid_minor_linetype = 1,
panel_grid_minor_linewidth = 0.5,
plot_background_fill = "black",
panel_widths = NULL,
panel_heights = NULL
)
Arguments
... |
Require named arguments (and support trailing commas). |
text_size |
The base size of the text theme element. Defaults to 10. |
text_family |
The base family of the text theme element. Defaults to "". |
text_colour |
The base colour of the text theme element. |
title_size |
The size of the |
title_family |
The family of the |
title_colour |
The colour of the |
subtitle_size |
The size of the |
subtitle_family |
The family of the |
subtitle_colour |
The colour of the |
caption_size |
The size of the |
caption_family |
The family of the |
caption_colour |
The colour of the |
caption_hjust |
The horizontal justification of the |
legend_place |
The place of the legend. Either "right", "top" or "bottom". |
legend_axis_line_colour |
The colour of the legend.axis.line theme element. |
legend_axis_line_linewidth |
The linewidth of the legend.axis.line theme element. |
legend_background_fill |
The fill (and colour) of the |
legend_key_fill |
The fill (and colour) of the legend.key theme element. |
legend_ticks_colour |
The colour of the legend.ticks theme element. |
legend_ticks_linewidth |
The linewidth of the legend.ticks theme element. |
legend_ticks_length |
The length of the legend.ticks.length theme element. |
axis_line_colour |
The colour of the axis.line theme element. Defaults to |
axis_line_linewidth |
The linewidth of the axis.line theme element. |
axis_ticks_colour |
The colour of the axis.ticks theme element. |
axis_ticks_linewidth |
The linewidth of the axis.ticks theme element. |
axis_ticks_length |
The length of the axis.ticks.length theme element. |
panel_background_fill |
The fill (and colour) of the panel.background theme element. |
panel_grid_colour |
The colour of the panel.grid theme element. |
panel_grid_linetype |
The linetype of the panel.grid.major theme element. |
panel_grid_linewidth |
The linewidth of the panel.grid.major theme element. |
panel_grid_minor_linetype |
The linetype of the panel.grid.minor theme element. |
panel_grid_minor_linewidth |
The linewidth of the panel.grid.minor theme element. |
plot_background_fill |
The fill (and colour) of the plot.background theme element. |
panel_widths |
The panel.widths theme element. A |
panel_heights |
The panel.heights theme element. A |
Details
Dark theme
Value
A ggplot theme.
theme_ggplot2—————————————————————-
Description
A complete theme for a coloured panel background on a white plot background. Defaults to using a panel grid colour that mixes 1/4 panel background fill with 3/4 white.
Usage
theme_ggplot2(
...,
text_size = 10,
text_family = "",
text_colour = flexoki::flexoki$base["black"],
title_size = NULL,
title_family = NULL,
title_colour = NULL,
subtitle_size = NULL,
subtitle_family = NULL,
subtitle_colour = NULL,
caption_size = NULL,
caption_family = NULL,
caption_colour = NULL,
caption_hjust = 0,
legend_place = "right",
legend_axis_line_colour = NULL,
legend_axis_line_linewidth = NULL,
legend_background_fill = NULL,
legend_key_fill = NULL,
legend_ticks_colour = NULL,
legend_ticks_linewidth = NULL,
legend_ticks_length = grid::unit(c(2.75, 0), "pt"),
axis_line_colour = NULL,
axis_line_linewidth = 0.2,
axis_ticks_colour = NULL,
axis_ticks_linewidth = NULL,
axis_ticks_length = grid::unit(3.66, "pt"),
panel_background_fill = scales::col_mix(flexoki::flexoki$base["base100"], "white", 0.5),
panel_grid_colour = NULL,
panel_grid_linetype = 1,
panel_grid_linewidth = 1,
panel_grid_minor_linetype = 1,
panel_grid_minor_linewidth = 0.5,
plot_background_fill = "white",
panel_widths = NULL,
panel_heights = NULL
)
Arguments
... |
Require named arguments (and support trailing commas). |
text_size |
The base size of the text theme element. Defaults to 10. |
text_family |
The base family of the text theme element. Defaults to "". |
text_colour |
The base colour of the text theme element. |
title_size |
The size of the |
title_family |
The family of the |
title_colour |
The colour of the |
subtitle_size |
The size of the |
subtitle_family |
The family of the |
subtitle_colour |
The colour of the |
caption_size |
The size of the |
caption_family |
The family of the |
caption_colour |
The colour of the |
caption_hjust |
The horizontal justification of the |
legend_place |
The place of the legend. Either "right", "top" or "bottom". |
legend_axis_line_colour |
The colour of the legend.axis.line theme element. |
legend_axis_line_linewidth |
The linewidth of the legend.axis.line theme element. |
legend_background_fill |
The fill (and colour) of the |
legend_key_fill |
The fill (and colour) of the legend.key theme element. |
legend_ticks_colour |
The colour of the legend.ticks theme element. |
legend_ticks_linewidth |
The linewidth of the legend.ticks theme element. |
legend_ticks_length |
The length of the legend.ticks.length theme element. |
axis_line_colour |
The colour of the axis.line theme element. Defaults to |
axis_line_linewidth |
The linewidth of the axis.line theme element. |
axis_ticks_colour |
The colour of the axis.ticks theme element. |
axis_ticks_linewidth |
The linewidth of the axis.ticks theme element. |
axis_ticks_length |
The length of the axis.ticks.length theme element. |
panel_background_fill |
The fill (and colour) of the panel.background theme element. |
panel_grid_colour |
The colour of the panel.grid theme element. |
panel_grid_linetype |
The linetype of the panel.grid.major theme element. |
panel_grid_linewidth |
The linewidth of the panel.grid.major theme element. |
panel_grid_minor_linetype |
The linetype of the panel.grid.minor theme element. |
panel_grid_minor_linewidth |
The linewidth of the panel.grid.minor theme element. |
plot_background_fill |
The fill (and colour) of the plot.background theme element. |
panel_widths |
The panel.widths theme element. A |
panel_heights |
The panel.heights theme element. A |
Details
Ggplot2 theme
Value
A ggplot theme.
theme_grey—————————————————————–
Description
A complete theme for a coloured panel background on a white plot background. Defaults to using a panel grid colour that multiply blends the panel background fill with itself.
Usage
theme_grey(
...,
text_size = 10,
text_family = "",
text_colour = flexoki::flexoki$base["black"],
title_size = NULL,
title_family = NULL,
title_colour = NULL,
subtitle_size = NULL,
subtitle_family = NULL,
subtitle_colour = NULL,
caption_size = NULL,
caption_family = NULL,
caption_colour = NULL,
caption_hjust = 0,
legend_place = "right",
legend_axis_line_colour = NULL,
legend_axis_line_linewidth = NULL,
legend_background_fill = NULL,
legend_key_fill = NULL,
legend_ticks_colour = NULL,
legend_ticks_linewidth = NULL,
legend_ticks_length = grid::unit(c(2.75, 0), "pt"),
axis_line_colour = NULL,
axis_line_linewidth = 0.2,
axis_ticks_colour = NULL,
axis_ticks_linewidth = NULL,
axis_ticks_length = grid::unit(3.66, "pt"),
panel_background_fill = scales::col_mix(flexoki::flexoki$base["base100"], "white", 0.5),
panel_grid_colour = NULL,
panel_grid_linetype = 1,
panel_grid_linewidth = 1,
panel_grid_minor_linetype = 1,
panel_grid_minor_linewidth = 0.5,
plot_background_fill = "white",
panel_widths = NULL,
panel_heights = NULL
)
Arguments
... |
Require named arguments (and support trailing commas). |
text_size |
The base size of the text theme element. Defaults to 10. |
text_family |
The base family of the text theme element. Defaults to "". |
text_colour |
The base colour of the text theme element. |
title_size |
The size of the |
title_family |
The family of the |
title_colour |
The colour of the |
subtitle_size |
The size of the |
subtitle_family |
The family of the |
subtitle_colour |
The colour of the |
caption_size |
The size of the |
caption_family |
The family of the |
caption_colour |
The colour of the |
caption_hjust |
The horizontal justification of the |
legend_place |
The place of the legend. Either "right", "top" or "bottom". |
legend_axis_line_colour |
The colour of the legend.axis.line theme element. |
legend_axis_line_linewidth |
The linewidth of the legend.axis.line theme element. |
legend_background_fill |
The fill (and colour) of the |
legend_key_fill |
The fill (and colour) of the legend.key theme element. |
legend_ticks_colour |
The colour of the legend.ticks theme element. |
legend_ticks_linewidth |
The linewidth of the legend.ticks theme element. |
legend_ticks_length |
The length of the legend.ticks.length theme element. |
axis_line_colour |
The colour of the axis.line theme element. Defaults to |
axis_line_linewidth |
The linewidth of the axis.line theme element. |
axis_ticks_colour |
The colour of the axis.ticks theme element. |
axis_ticks_linewidth |
The linewidth of the axis.ticks theme element. |
axis_ticks_length |
The length of the axis.ticks.length theme element. |
panel_background_fill |
The fill (and colour) of the panel.background theme element. |
panel_grid_colour |
The colour of the panel.grid theme element. |
panel_grid_linetype |
The linetype of the panel.grid.major theme element. |
panel_grid_linewidth |
The linewidth of the panel.grid.major theme element. |
panel_grid_minor_linetype |
The linetype of the panel.grid.minor theme element. |
panel_grid_minor_linewidth |
The linewidth of the panel.grid.minor theme element. |
plot_background_fill |
The fill (and colour) of the plot.background theme element. |
panel_widths |
The panel.widths theme element. A |
panel_heights |
The panel.heights theme element. A |
Details
Grey theme
Value
A ggplot theme.
theme_light——————————————————————
Description
A complete theme for a white plot and panel background.
Usage
theme_light(
...,
text_size = 10,
text_family = "",
text_colour = flexoki::flexoki$base["black"],
title_size = NULL,
title_family = NULL,
title_colour = NULL,
subtitle_size = NULL,
subtitle_family = NULL,
subtitle_colour = NULL,
caption_size = NULL,
caption_family = NULL,
caption_colour = NULL,
caption_hjust = 0,
legend_place = "right",
legend_axis_line_colour = NULL,
legend_axis_line_linewidth = NULL,
legend_background_fill = NULL,
legend_key_fill = NULL,
legend_ticks_colour = NULL,
legend_ticks_linewidth = NULL,
legend_ticks_length = grid::unit(c(2.75, 0), "pt"),
axis_line_colour = NULL,
axis_line_linewidth = 0.2,
axis_ticks_colour = NULL,
axis_ticks_linewidth = NULL,
axis_ticks_length = grid::unit(3.66, "pt"),
panel_background_fill = "white",
panel_grid_colour = flexoki::flexoki$base["base50"],
panel_grid_linetype = 1,
panel_grid_linewidth = 1,
panel_grid_minor_linetype = 1,
panel_grid_minor_linewidth = 0.5,
plot_background_fill = "white",
panel_widths = NULL,
panel_heights = NULL
)
Arguments
... |
Require named arguments (and support trailing commas). |
text_size |
The base size of the text theme element. Defaults to 10. |
text_family |
The base family of the text theme element. Defaults to "". |
text_colour |
The base colour of the text theme element. |
title_size |
The size of the |
title_family |
The family of the |
title_colour |
The colour of the |
subtitle_size |
The size of the |
subtitle_family |
The family of the |
subtitle_colour |
The colour of the |
caption_size |
The size of the |
caption_family |
The family of the |
caption_colour |
The colour of the |
caption_hjust |
The horizontal justification of the |
legend_place |
The place of the legend. Either "right", "top" or "bottom". |
legend_axis_line_colour |
The colour of the legend.axis.line theme element. |
legend_axis_line_linewidth |
The linewidth of the legend.axis.line theme element. |
legend_background_fill |
The fill (and colour) of the |
legend_key_fill |
The fill (and colour) of the legend.key theme element. |
legend_ticks_colour |
The colour of the legend.ticks theme element. |
legend_ticks_linewidth |
The linewidth of the legend.ticks theme element. |
legend_ticks_length |
The length of the legend.ticks.length theme element. |
axis_line_colour |
The colour of the axis.line theme element. Defaults to |
axis_line_linewidth |
The linewidth of the axis.line theme element. |
axis_ticks_colour |
The colour of the axis.ticks theme element. |
axis_ticks_linewidth |
The linewidth of the axis.ticks theme element. |
axis_ticks_length |
The length of the axis.ticks.length theme element. |
panel_background_fill |
The fill (and colour) of the panel.background theme element. |
panel_grid_colour |
The colour of the panel.grid theme element. |
panel_grid_linetype |
The linetype of the panel.grid.major theme element. |
panel_grid_linewidth |
The linewidth of the panel.grid.major theme element. |
panel_grid_minor_linetype |
The linetype of the panel.grid.minor theme element. |
panel_grid_minor_linewidth |
The linewidth of the panel.grid.minor theme element. |
plot_background_fill |
The fill (and colour) of the plot.background theme element. |
panel_widths |
The panel.widths theme element. A |
panel_heights |
The panel.heights theme element. A |
Details
Light theme
Value
A ggplot theme.
Void drift refine
Description
Removes all axis lines, ticks, and minor ticks, and removes all axis text and axis titles. Removes panel gridlines on the orientation axis only when at least one axis is discrete.
Usage
void_drift(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
Void drop refine
Description
Removes all axis lines, ticks, and minor ticks, and removes all axis text and axis titles. Removes all panel gridlines.
Usage
void_drop(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
Void flow refine
Description
Removes all axis lines, ticks, and minor ticks, and removes all axis text and axis titles. Removes panel gridlines on the orientation axis.
Usage
void_flow(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object
Void keep refine
Description
Removes all axis lines, ticks, and minor ticks, and removes all axis text and axis titles. Panel gridlines are left unchanged.
Usage
void_keep(..., discrete = "none", orientation = NULL)
Arguments
... |
Reserved for future extensions. Placed first so later arguments must be named, and to support trailing commas in calls. |
discrete |
Character scalar describing which axes should be treated as
discrete for refinement purposes: |
orientation |
Character. The primary axis of interest: |
Value
A ggplot2 theme object