To override the default "a" in the label of a text legend: first check if
This is a relatively common request on SO, to wit: https://stackoverflow.com/questions/48892982/change-key-letter-in-legend-of-ggplot
The current version of
Example using the fix
To override the default "a" in the label of a text legend: first check if `data$label` has anything in it; if not, use "a" as before. However, if the user sets a label within `guide_legend(override.aes = list(label = "foo"))`, then use that label or vector of labels as the first arg of `textGrob`.