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.
last_plot() + scale_size(range = c(5,1)) + guides(size = guide_legend(reverse=TRUE))