I would go with formatted text using sprintf. Much cleaner and simpler. If you still want a plot, you can go with the following:
This matrix tblcontains your data:
tbl <- matrix(data=rep(0:1,25), nrow=5)
You can generate a chart as:
plot(1, 1, xlim=c(1,dim(tbl)[2]+.5), ylim=c(0.5,dim(tbl)[1]), type="n")
lapply(1:dim(tbl)[1], function(x) {
text(x=c(1:dim(tbl)[2]), y=rep(x,dim(tbl)[2]), labels=tbl[x,])
})
Using this as a basis, you can play around with textand graphics argsto style the schedule as you wish.
source
share