'I would like to add labels in some precise points of the ggplot graph, how can i do it?
I built a ggplot, on the x axis I reported the dates and on the y values with the following code:
ggplot() +
geom_line(aes(x=date,y=stat),color='blue',) +
geom_line(aes(x=date,y=fit),color='red',lty=5) +
ylab('Values') + xlab('date') +
scale_x_date(date_breaks = "week", date_labels = "%d %b %Y") +
theme_classic() +
theme(axis.text.x = element_text(angle = 90, vjust = 0.5,hjust=1))
I would like to add labels in some precise points of the graph, how can i do it? I would like to choose the possession within the graph and the writing
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
