how can i make regression each lines for labels(road) using stat_smooth(method = 'lm')? i can not get any lines with this code..
library(ggplot2)
p1<-ggplot(data=a, aes(x = date_cut, y = price_mul, color=road)) +
geom_point(size=1.5) + stat_smooth(method = 'lm') +
scale_x_discrete(limits = c("06", "07", "08", "09", "10", "11", "12", "01", "02", "03", "04", "05")) +
ylim(0, max(a$price_mul)) + labs(x = "month (2018.06 ~ 2019.05)", y = "price", size = 10) +
theme_calc() +
scale_color_discrete(name="road") +
theme(plot.title = element_text(face = "bold", hjust = 0.5, size = 16, color = "black"))