[R] missing lines when using image()
Tom Bloemberg
t.bloemberg at science.ru.nl
Thu Feb 15 17:40:07 CET 2007
When making an image of a rather big matrix, containing a lot of NA's
and not that much real numbers, like in the following (rather simple)
example
M <- matrix(NA,1000,1000)
M[,seq(1,1000,length.out=50)] <- 1
image(M)
information (in this case: horizontal lines) is missing in the resulting
image. This probably is because the vertical screen resolution is
smaller than the number of rows in the matrix.
Does anyone know of a general method (apart from the obvious and not
really general methods of buying a bigger screen, zooming in on part of
the matrix, and simply not making an image of such a big matrix) that
causes the missing lines to be visualized?
When I visualized the same matrix in Matlab (my sincere apologies to
those considering this to be blasphemy), looking at a mesh plot from the
top, all the lines were nicely visible, so it should be possible in some
way...
Regards,
Tom Bloemberg
More information about the R-help
mailing list