why isn't its color blue?

ggplot(mpg, aes(x = displ, y = hwy, color = "blue")) + geom_point()

If you define color = "blue" inside the aes() function you are mapping the color aesthetic to a factor containing the "blue" label, if you want to set the color instead, you have to do it outside the aes() function, see this example.


ggplot(mpg, aes(x = displ, y = hwy)) +
    geom_point(color = "blue")

Created on 2019-11-29 by the reprex package (v0.3.0.9000)


Thanks a lot
I will try it