I have this dataset.
My current R code:
plot(dailyDataCenOF$cenInOFThroughput, type = "l", xaxt = "n", col = "blue",
main = "Throughput",
xlab = "Time",
ylab = "Throughput (Mbps)")
axis(side = 1, at = seq(1, 48, by = 2), labels = 0:23)
par(new = TRUE)
plot(dailyDataCenOF$cenOutOFThroughput, type = "l", xaxt = "n", col = "red",
axes = F, xlab = NA, ylab = NA)
plots the following:
The result is not what I want to have. Ideally I would like to have the actual time (date is not necessary) from the dataset as X axis labels. I only managed to have 0:23 representing the hours as my X axis labels. I tried to use:
axis(side = 1, at = seq(2, 49, by = 2), labels = 0:23, col = "red")
but the new labels overlap with the previous labels. Even the different color does not make it easy to read.
Of course I can use:
axis(side = 3, at = seq(2, 49, by = 2), labels = 0:23, col = "red")
but I the labels should be at the bottom.
Is there more optimal and/or effective solution for this problem?
Thank you.