I have two geoms in a ggplot2 object that both use the size aesthetic. How can I manually supply the size range to one geom but exclude the others?
So in the plot below I want to do scale_size
for the geom_point
but exclude geom_text
's size aesthetic.
library(ggplot2)
mtcars$car <- rownames(mtcars)
ggplot(mtcars, aes(mpg, wt)) +
geom_point(aes(size=disp), alpha=.2) +
geom_text(aes(label=car, size=disp)) +
scale_size(range=c(11, 20))