Is it possible to scale up the size of my of points in geom_jitter or geom_point and still have the points anchored to a size
variable (in my case n
)? Essentially I'd like to control all the points being smaller or larger.
I've tried increasing the values of the n
variable by scaling that variable by 10 and 100, but this did not change the size of points.
library(dplyr)
library(ggplot)
mtcars %>%
mutate(vs = factor(vs, labels = c("V", "S"))) %>%
group_by(cyl, vs) %>% count() %>%
ggplot(aes(x = cyl, y = vs, size = n)) +
geom_jitter(height = .1, fill = "blue", colour = "white", pch = 21)