Display the x-axis on ggplot as month only in R
For me, what worked was
library(scales)
+ scale_x_date(date_labels = "%b-%d-%Y")
More info here
As your x values are date you can use scale_x_date()
to change format of labels. Library scales
is needed to get better formatting of breaks and labels.
library(scales)
+scale_x_datetime(labels = date_format("%b"))