plot
plot copied to clipboard
Convert group levels names to title or sentence case in Plot legend
It would be awesome if there was an easy way to update legend labels to (e.g. to title or sentence case) if the original data has them in a less finalized looking case (e.g. from snake or camel case).
In other words, is there a way to simplify changing "group_a" "group_b" "group_c" to "Group A" "Group B" "Group C" in the legend?
A smart format function that can be applied to color legend (as tickFormat) and x/y axes labels.
@allisonhorst did you mention an R package that does something like this? I could imagine prototyping a function by porting it over in a notebook first
Specifically janitor::clean_names()
here is an initial prototype in notebook: https://observablehq.com/d/3c2f0cf16948edb5