I am trying to make a line graph of some performance data that I have collected using R. I want to graph each cpu and the total. I have a Names column in my txt file and I
The error message is due to fact that your x values are datetime
and difference between two values is just one second (too small to show data). You have to use scale_x_datetime()
and set breaks
to "1 sec"
to show your data.
library(ggplot2)
library(scales)
ggplot(cpu, aes(Date, Usage, colour=Name)) +
geom_line(size=1) +
scale_x_datetime(breaks = date_breaks("1 sec"))