A dark mode family of functions:
dark_mode_r()
with legend on right
dark_mode_t()
with legend on top
dark_mode_b()
with legend on bottom
dark_mode_r(
...,
base_size = 11,
base_family = "",
base_colour = "#C8D7DFFF",
axis_line_colour = "#C8D7DFFF",
axis_line_linewidth = 0.33,
axis_ticks_colour = axis_line_colour,
axis_ticks_linewidth = axis_line_linewidth,
panel_grid_colour = "#00040AFF",
panel_grid_linewidth = 1.33,
panel_background_fill = "#050D1BFF",
plot_background_fill = "#00040AFF",
legend_axis_line_colour = plot_background_fill,
legend_axis_line_linewidth = 0.33,
legend_background_fill = plot_background_fill,
legend_key_fill = plot_background_fill,
legend_ticks_colour = legend_axis_line_colour,
legend_ticks_linewidth = legend_axis_line_linewidth,
legend_ticks_length = ggplot2::rel(c(0.175, 0))
)dark_mode_t(
...,
base_size = 11,
base_family = "",
base_colour = "#C8D7DFFF",
axis_line_colour = "#C8D7DFFF",
axis_line_linewidth = 0.33,
axis_ticks_colour = axis_line_colour,
axis_ticks_linewidth = axis_line_linewidth,
panel_grid_colour = "#00040AFF",
panel_grid_linewidth = 1.33,
panel_background_fill = "#050D1BFF",
plot_background_fill = "#00040AFF",
legend_axis_line_colour = plot_background_fill,
legend_axis_line_linewidth = 0.33,
legend_background_fill = plot_background_fill,
legend_key_fill = plot_background_fill,
legend_ticks_colour = legend_axis_line_colour,
legend_ticks_linewidth = legend_axis_line_linewidth,
legend_ticks_length = ggplot2::rel(c(0.175, 0))
)
dark_mode_b(
...,
base_size = 11,
base_family = "",
base_colour = "#C8D7DFFF",
axis_line_colour = "#C8D7DFFF",
axis_line_linewidth = 0.33,
axis_ticks_colour = axis_line_colour,
axis_ticks_linewidth = axis_line_linewidth,
panel_grid_colour = "#00040AFF",
panel_grid_linewidth = 1.33,
panel_background_fill = "#050D1BFF",
plot_background_fill = "#00040AFF",
legend_axis_line_colour = plot_background_fill,
legend_axis_line_linewidth = 0.33,
legend_background_fill = plot_background_fill,
legend_key_fill = plot_background_fill,
legend_ticks_colour = legend_axis_line_colour,
legend_ticks_linewidth = legend_axis_line_linewidth,
legend_ticks_length = ggplot2::rel(c(0.175, 0))
)
A ggplot theme.
Provided to force user argument naming etc.
The base size of the text theme element. Defaults to 11.
The base family of the text theme element. Defaults to "".
The base colour of the text theme element.
The colour of the axis.line theme element.
The linewidth of the axis.line theme element.
The colour of the axis.ticks theme element.
The linewidth of the axis.ticks theme element.
The colour of the panel.grid theme element.
The linewidth of the panel.grid theme element.
The fill (and colour) of the panel.background theme element.
The fill (and colour) of the plot.background theme element.
The colour of the legend.axis.line theme element.
The linewidth of the legend.axis.line theme element.
The fill (and colour) of the legend.background theme element.
The fill (and colour) of the legend.key theme element.
The colour of the legend.ticks theme element.
The linewidth of the legend.ticks theme element.
The legend.ticks.length theme element.
library(palmerpenguins)
library(ggplot2)
set_blanket()
penguins |>
gg_point(
x = flipper_length_mm,
y = body_mass_g,
col = species,
mode = dark_mode_r()
)
penguins |>
gg_point(
x = flipper_length_mm,
y = body_mass_g,
col = species,
mode = dark_mode_t()
)
penguins |>
gg_point(
x = flipper_length_mm,
y = body_mass_g,
col = species,
mode = dark_mode_b()
)
Run the code above in your browser using DataLab