library(ggplot2)
library(dplyr)
data("mtcars")
data1 <- mtcars %>% group_by(carb) %>% summarise_at(.vars = "mpg",.funs = mean)
ggplot(data =data1,aes(x = carb,y = mpg))+geom_line( color = "red")+
xlim(0,20)+ylim(0,20)+coord_fixed(ratio = 1/1)+
geom_abline(intercept = 0,slope = 1.5)
以上是代码和结果,我的问题是x轴和y轴不在同一个起点上(即x起点0和y起点0是分开的),如何让X轴和Y轴的起点在同一个点上呢?请提供完整代码,谢谢。