GGPLOT - scale_grey

Creates a sequential grey colour scales and then convert them with ggplotly.

p <- ggplot(mtcars, aes(mpg, wt)) + geom_point(aes(colour = factor(cyl)))
p <-  p + scale_colour_grey()
plotly::ggplotly(p)
p <- ggplot(mtcars, aes(mpg, wt)) + geom_point(aes(colour = factor(cyl)))
p <-  p + scale_colour_grey(end = 0)
plotly::ggplotly(p)
p <- ggplot(mtcars, aes(mpg, wt)) + geom_point(aes(colour = factor(cyl)))
p <-  p + scale_colour_grey() + theme_bw()
plotly::ggplotly(p)
miss <- factor(sample(c(NA, 1:5), nrow(mtcars), replace = TRUE))
p <-    
 ggplot(mtcars, aes(mpg, wt)) +
  geom_point(aes(colour = miss)) +
  scale_colour_grey()
plotly::ggplotly(p)
miss <- factor(sample(c(NA, 1:5), nrow(mtcars), replace = TRUE))
p <-    
 ggplot(mtcars, aes(mpg, wt)) +
  geom_point(aes(colour = miss)) +
  scale_colour_grey(na.value = "green")
plotly::ggplotly(p)