How to reverse point size in ggplot?
问题 Please, help me with this point. I need the positive values to be represented as small points and negative as large points. If I tape minus before size, the point sizes are right but the legend is changing: df=data.frame(x=rnorm(20),y=runif(20),z=rnorm(20)) ggplot(df,aes(x=x,y=y))+geom_point(aes(size=-z)) so that does not suite. 回答1: One solution would be to use scale_size() and set your own breaks and then labels in opposite direction. Changed range of z values to get better representation.