modelr
modelr copied to clipboard
Allow American spelling of "colour" in geom_ref_line
It would be nice if geom_ref_line() could handle the American spelling of "colour" too, like ggplot2 does.
Example:
library(tidyverse)
library(modelr)
mtcars %>%
ggplot() +
geom_point(aes(mpg, hp, color = as.factor(cyl))) +
geom_ref_line(h = 120, colour = "black", size = 0.5)

mtcars %>%
ggplot() +
geom_point(aes(mpg, hp, color = as.factor(cyl))) +
geom_ref_line(h = 120, color = "black", size = 0.5)
#> Error in geom_ref_line(h = 120, color = "black", size = 0.5): unused argument (color = "black")
Created on 2020-08-02 by the reprex package (v0.3.0)