Hi, Is there any option to use two variables in parameter size
in ggplot
function? E.g.
ggplot(mtcars, aes(qsec,drat, size = cyl))+
geom_point()
Obviously it works and size
of points depends on cyl
variable. But is it any option to add another size
variable which can use alpha
option e.g.variable = mpg
. I found sth like that:
ggplot() +
geom_point(data = mtcars, aes(qsec,drat, size = cyl)) +
geom_point(data = mtcars, aes(qsec,drat, size = mpg), alpha = .1, colour = "red")
But when I want to set the size
of each variable separately, it is not possible. When there is one size variable normally I use scale_size_contiunous
but with two size variables it doesn't work. I know that using scale_size_continuous
two times doesn't change anything. It is possible to achieve appropriate graph?