GGPLOT - geom_jitter

Add a small amount of random variation to the location of each point and then convert them with ggplotly.

p <- ggplot(mpg, aes(cyl, hwy))
p <-  p + geom_point()
plotly::ggplotly(p)
p <- ggplot(mpg, aes(cyl, hwy))
p <-  p + geom_jitter()
plotly::ggplotly(p)
p <- ggplot(mpg, aes(cyl, hwy))
p <-  p + geom_jitter(aes(colour = class))
plotly::ggplotly(p)
p <- ggplot(mpg, aes(cyl, hwy))
p <-    
 ggplot(mpg, aes(cyl, hwy)) +
  geom_jitter()
plotly::ggplotly(p)
p <- ggplot(mpg, aes(cyl, hwy))
p <-    
 ggplot(mpg, aes(cyl, hwy)) +
  geom_jitter(width = 0.25)
plotly::ggplotly(p)
p <- ggplot(mpg, aes(cyl, hwy))
p <-    
 ggplot(mpg, aes(cty, hwy)) +
  geom_jitter()
plotly::ggplotly(p)
p <- ggplot(mpg, aes(cyl, hwy))
p <-    
 ggplot(mpg, aes(cty, hwy)) +
  geom_jitter(width = 0.5, height = 0.5)
plotly::ggplotly(p)