Closed
Description
For both label and text keys, the size of the label
aesthetic isn't communicated properly. If the label isn't the default "a"
, this lets text go out of the bounds of the key area. Moreover, the label keys don't really look like labels as they appear in the plot.
With #5465 in place, we can now assign the appropriate size for label and text keys.
A slightly contrived example to show the issue with the current keys:
devtools::load_all("~/packages/ggplot2")
#> ℹ Loading ggplot2
ggplot(mpg, aes(displ, hwy, label = class, colour = class)) +
geom_text(angle = 45) +
discrete_scale(
"label", palette = identity_pal(), super = ScaleDiscreteIdentity
)
ggplot(mpg, aes(displ, hwy, label = class, colour = class)) +
geom_label(angle = -45) +
discrete_scale(
"label", palette = identity_pal(), super = ScaleDiscreteIdentity
)
Created on 2023-12-04 with reprex v2.0.2
Metadata
Metadata
Assignees
Labels
No labels