0

I would like to add year below the months in x-axis I want it be same font but bigger and centered. Something like this:

enter image description here

Allan Cameron
  • 147,086
  • 7
  • 49
  • 87
  • Please add some relevant code producing a plot with a date scale in the appropriate range of time. – teunbrand Nov 02 '21 at 22:47
  • 1
    There is no built in way to do this in ggplot2 analogous to how excel does it, for instance. You might look at using facets like in this answer: https://stackoverflow.com/a/36337286/6851825 or using text/annotations like this: https://stackoverflow.com/a/39718330/6851825 – Jon Spring Nov 02 '21 at 22:55
  • This is my code: onset_month_epigraph <- ggplot(onset_month_count, aes(fill=location_type, y=case_count, x=Month_Yr)) + geom_bar(position="stack", stat="identity") + labs(y="Number of incidents", x="\ Month of Start incident Period**", title="Title") + scale_x_date(date_labels = "%b-%y", date_breaks = "1 month") – donkeypeach Nov 03 '21 at 16:39

0 Answers0