R ggplot2-严格限制x轴和y轴

R ggplot2-严格限制x轴和y轴,r,ggplot2,plot,R,Ggplot2,Plot,我有以下图表: set.seed(123456) Party1_1 <- round(rnorm(20,mean=40,sd=5),0)/100 Party1_2 <- round(rnorm(20,mean=60,sd=5),0)/100 ei.data <- as.data.frame(cbind(Party1_1,Party1_2)) ei <- ggplot(ei.data, aes(Party1_1,Party1_2))+ geom_point()+

我有以下图表:

    set.seed(123456)
Party1_1 <- round(rnorm(20,mean=40,sd=5),0)/100
Party1_2 <- round(rnorm(20,mean=60,sd=5),0)/100
ei.data <- as.data.frame(cbind(Party1_1,Party1_2))
ei <- ggplot(ei.data, aes(Party1_1,Party1_2))+
  geom_point()+
  theme_bw()+
  scale_y_continuous(limits = c(0, 1))+
  scale_x_continuous(limits = c(0, 1))
ei
set.seed(123456)
Party1_1只需将
expand=c(0,0)
添加到您的量表中即可

ggplot(ei.data, aes(Party1_1,Party1_2))+
  geom_point()+
  theme_bw()+
  scale_y_continuous(expand=c(0,0), limits = c(0, 1))+
  scale_x_continuous(expand=c(0,0), limits = c(0, 1))
这是你想要的吗