library(ggplot2)
# Mapped roughness is rescaled to c(0.01, 0.75) automatically.
ggplot(mtcars, aes(wt, mpg, roughness = hp)) +
geom_sketch_point(size = 3, seed = 1L)
# Widen the band so the wobble difference is more dramatic.
ggplot(mtcars, aes(wt, mpg, roughness = hp)) +
geom_sketch_point(size = 3, seed = 1L) +
scale_roughness_continuous(range = c(0, 1.2))
Run the code above in your browser using DataLab