I am trying to get extend my confidence interval to 13 on my x axis. I tried using coord_cartesian
but it only expands towards the left (towards lower values of x).
I was doing a multiple regression using my dataset annualall
with 3 variables (Tavtemp
, Trainfall
, Twindspeed
) and was trying to plot the linear regression results separately for each variable.
Here is my code:
model_Tannual<-lm(Survival~Tavtemp+Trainfall+Twindspeed, data=
annualall)
summary(model_Tannual)
ggplot(annualall,aes(x=Tavtemp, y=Survival))+ geom_point() + ylim(0,0.4)+
geom_smooth(method = "lm", se=TRUE,
fullrange=TRUE,size=0.5,colour="black")+scale_x_continuous(limits = c(10,13))+
xlab("Annual Average Temperature(°C)") +ylab ("Post-fledging Survival Rate")+
coord_cartesian(xlim = c(10,13))
My plot and dataset are in the link below. Thank you!