Make up data:
d <- data.frame(millis=1:1e6,y=rnorm(1e6))
d$c <- rep(1:1e5,length.out=nrow(d))
This is easy to write but takes a long time to render.
library(ggplot2)
ggplot(d,aes(x=millis,y=y))+facet_grid(c~.)+geom_line()
Or (also slow)
library(lattice)
xyplot(y~millis|c,data=d,layout=c(10,1))
(To be honest I gave up waiting for either of the above to finish.)
Fastest in base graphics:
par(mfrow=c(10,1),mar=c(0,4,0,1),las=1)
for (i in 1:10) {
plot(y~millis,data=d[1:999999+(i-1)*1e5,],type="l",
axes=FALSE,ann=FALSE)
box()
axis(side=2)
}
See ?par
for help adjusting outer margins, etc etc etc.
You might consider subsampling: if your screen (or other output device) is only a few 1000 pixels wide, and you plot 100,000 points across the width of the screen, then most of them are going to be hidden anyway!