Change size of geom_point based on values in column

Viewed 1691

I have plotted data with geom_point and the size of the data point is set by the the values in a column. I want to increase the overall size of these points ( and also keeping the relative sizes). I have tried to just multiply all the values with a number, but the point sizes stay the same. How can I increase the overall point size? enter image description here

1 Answers

Modify the range in scale_size() or if you prefer scale_radius()

library(tidyverse)

mtcars %>% 
  ggplot(aes(x = disp, y = hp)) +
  geom_point(aes(size = mpg), alpha = 0.5) +
  scale_size(range = c(5, 10))

Created on 2021-03-16 by the reprex package (v1.0.0)

Related