使用ggplot2进行气泡图的绘制,并拟合了一个趋势线,但是气泡大小的图例始终显示不出来,呈现下图的情况。不知道我是哪里出现了问题,求大神解答!
附上我的绘图代码!
library(ggplot2)
tt<-ggplot(rs_M,aes(x=RPM, y=SMD , size= Weight , color = n))+
geom_point(alpha=0.5)+
scale_size_continuous(trans = "exp",range=c(01,10))+
scale_color_gradient(low = "green",high = "red")+
geom_smooth(aes(x=RPM,y=SMD) ,method = "loess")+
mytheme