Skip to content

Question about image() behavior

2 messages · Justin McGrath, Duncan Murdoch

#
On 25/11/2009 3:00 PM, Justin McGrath wrote:
It's doing what is documented.  Giving uneven spacing to x values just 
says that the rectangles being coloured by the z values are not square.

If you want to leave blanks, then put in NA values for z.

For example,

x <- c(1:6, 100:105)
y <- 1:10
z <- matrix(rnorm(110), 11, 10)
z[6,] <- NA
image(x,y,z)

Duncan Murdoch