ggeasy
ggeasy copied to clipboard
Recognize color besides colour
library(ggplot2)
df = data.frame(my_x=1, my_y=2, my_col=3)
p <- ggplot(df, aes(x=my_x, y=my_y, color=my_col)) + geom_point()
print(p + labs(colour = "works, too"))
print(p + labs(color = "works"))
print(p + ggeasy::easy_labs(colour = "works, yeah"))
print(p + ggeasy::easy_labs(color = "does not work"))
Ergo, ggeasy::easy_labs does not recognize color, while ggplot2::labs does.
Good idea! ggplot2 does an internal lookup of aes alternatives and we can borrow that logic to be consistent.
I can't guarantee a timeline, so if you're interested you're welcome to have a go at implementing this change in a PR.