I was trying to emphasize some specific size as a reference in my legend. I tried scale_size_continuous
and scale_size_manual
without any luck. Below is a toy example, is there anyone who can help with it?
set.seed(926)
dat.toy <- data.frame(x1 = rnorm(100),
x2 = rnorm(100),
x3 = factor(sample(1:5,100,replace = T)),
x4 = factor(sample(1:4,100,replace = T)))
require(ggplot2)
ggplot(dat.toy,aes(x=x3,y=x4,colour = x1, size = x2)) +
geom_point()
The desired result should be able to customize (amplify or shrink) the size of the circle, add the size of the circle for -3
, delete (hide) the size of the circle for 2
in the legend.
Thanks in advance.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.