Could-you help me please in solving this issue. In fact, i would like to plot multiple curves on the same graph on R with a x-axis which is time labeled.
I tried this :
dayTime = strptime(sapply(c(0:110)+480, function(x){paste(floor(x/60),":",x%%60, sep="")}), "%H:%M")
n = 10
pdf("myGraph.pdf")
plot(x=dayTime, y=rep(0, length(dayTime)), main="myGraph", xlab="Time", ylab="Level", type="n", ylim=c(0, 0.05), xaxt = "n")
for(i in 1:n)
{
lines(myData[, i]), col=i)
}
r = as.POSIXct(round(range(dayTime), "hours"))
axis.POSIXct(1, at=seq(r[1], r[2], by="hour"), format="%H")
legend("topleft", legend=stockspool, col=c(1:n), lwd=rep(1, n), cex=0.8)
dev.off()
but the problem is that i can not add a curve with lines in this context, but if i plot only one curve using plot, it works fine.
Thank you very much.