Ferdi Ferdi - 1 month ago 10
R Question

Difference between scale_color_grey and scale_colour_grey in ggplot2

What is the Difference between

scale_color_grey
and
scale_colour_grey
in ggplot2?

Color
and
Colour
appear several times in
ggplot2
. Is there a general rule for the difference between color and colour in
ggplot2
?

Answer

There is no difference concerning the code. British English vs. American English.

library(ggplot2)
identical(scale_colour_grey, scale_color_grey)
#[1] TRUE

Both are calling the same function:

> scale_color_grey
function (..., start = 0.2, end = 0.8, na.value = "red") 
{
    discrete_scale("colour", "grey", grey_pal(start, end), na.value = na.value, 
        ...)
}