In the following little dataset, I would like to plot date values on the x axis. I want all ticks of the dates present in the dataframe to be labelled. At the moment it is o
You can supply melt$Sample
as the breaks. You'll probably also want to rotate the axis labels to avoid overlap.
ggplot(melt, aes(x = Sample, y = value, colour = variable, group = variable)) +
facet_wrap(~Treatment) +
geom_point() +
geom_line() +
scale_x_date(breaks = melt$Sample) +
theme(axis.text.x = element_text(angle = 90))