Closed teunbrand closed 3 years ago
Might as well make a spin-off package with different guide extensions
You can do this now.
library(ggh4x)
#> Loading required package: ggplot2
ggplot(mpg, aes(displ, hwy)) +
geom_point(aes(colour = manufacturer)) +
guides(colour = guide_stringlegend(ncol = 2))
Created on 2021-01-09 by the reprex package (v0.3.0)
Implement new legend guide that describes colour or fill with coloured text. Should take the scale's labels and apply the mapped colour to the labels. Goal is to have it look like the following, but easier to specify and strings left-aligned by default.
Created on 2021-01-06 by the reprex package (v0.3.0)