[R] suppress y-axis in a dotplot (lattice)

Daniel Malter daniel at umd.edu
Tue Nov 13 23:28:07 CET 2007


I want to illustrate when individuals had an event over time. I am using
dotplot from the lattice library. The plot itself works well, but as I have
many individuals, the labels on the y-axis for these individuals overlap. So
the y-axis is unreadable. Therefore, I want to suppress the labels on the y
axis. I could not get it done. axes=FALSE does not work and I tried other
methods, but it seemed to be the wrong command for dotplot (or lattice).

To see what I mean you can run the following code:

dotplot(SUBJECT~TIME,xlab="Calendar day",ylab="Events by

That is, I am looking for the argument in the dotplot() function call that
makes the mess on the y-axis disappear. Alternatively, I would also use a
different type of plot if it serves the same purpose. In particular it would
be nice if the horizontal lines connect only an individuals events (so that
they are not a grid, but rather a function of the data).

Thanks much,

More information about the R-help mailing list