I'm trying to remove the empty space between the start of the data lines inside this graph and the axis. The min for the x axis is 25 but if I make that the lower xlim it still keeps that space, and if I make the lower xlim 50, there is also still a space.
f <- plot %>%
ggplot(aes(x=Mean_precip_cm,group=Age))+
geom_smooth(aes(y=fit, col=Age), size=2, method=NULL, se=FALSE)+
geom_ribbon(aes(ymin = lwr,ymax = upr, fill = Age), alpha=0.1)+
theme_classic()+
scale_x_continuous(limits = c(NA, NA), breaks = c(50, 100, 150, 200, 250,300,350))+
labs(
x = "Mean annual precipitation (cm)",
y = "Predicted total depth (cm)",
face = "bold" ) +
theme(text = element_text(size = 15))+
theme(axis.text.x= element_text(colour = "black", size = 15))+
theme(axis.text.y= element_text(colour = "black", size = 15))+
scale_color_canva(guide ="none", palette = "Fun and tropical") +
scale_fill_canva(palette = "Fun and tropical") +
theme(panel.background = element_rect(fill = 'transparent', colour = NA), plot.background = element_rect(fill = "transparent", colour = NA))
f