ggblanket
ggblanket copied to clipboard
colourbar/coloursteps: guide margins will not scale with text size
Currrently, the margin of the margin in legend text for colourbar/coloursteps is added in a guide function in gg_blanket
.
It should ideally be instead in the *_mode_*
functions
However, ggplot2 does not currently provide seperate theme arguments for colourbar/colourstep guides
requires ggplot to make seperate theme elements for colourbar and coloursteps guides
- Update base mode code as below
- Remove special mode_* code that relates to these elements
- Remove from gg_blanket theme code
library(tidyverse)
library(palmerpenguins)
penguins |>
ggplot() +
geom_point(aes(x = flipper_length_mm,
y = body_mass_g,
col = bill_depth_mm)) +
light_mode_b() +
theme(legend.text = element_text(margin = margin(5.5,5.5,5.5,5.5))) +
theme(legend.key.spacing.x = grid::unit(11, "pt"))