From: Don MacQueen <macq_at_llnl.gov>

Date: Sat 16 Jul 2005 - 01:06:55 EST

image(x,y,z)

Date: Sat 16 Jul 2005 - 01:06:55 EST

x <- 1:10 y <- 1:15 z <- outer(x,y)

image(x,y,z)

xb <- c(.5,x+.5)

yb <- c(.5,y+.5)

image(x,y,z)

x and y provide either the centers of the cells, or the boundaries of the cells. In the latter case, the lengths of x and y should be 1 greater than the dim of z, not one less.

(I'm including my full version info to be complete, but I doubt that you problem has to do with your platform [OS]).

-Don

*> version
*

_

platform powerpc-apple-darwin7.9.0

arch powerpc os darwin7.9.0 system powerpc, darwin7.9.0 status major 2 minor 1.1 year 2005 month 06 day 20 language R

At 7:23 AM -0700 7/15/05, Pete Cap wrote:

>Hello all,

*>
**>Can anyone point me to a decent introduction to using the plotting
**>and assorted graphics functions in R?
**>
**>I keep getting simple errrors and I can't figure out why, for example:
**>
**>> image(x,y,z)
**>Error in image.default(x, y, z) : dimensions of z are not
**>length(x)(+1) times length(y)(+1)
**>> length(x)
**>[1] 206
**>> length(y)
**>[1] 40
**>> dim(z)
**>[1] 207 41
**>
**>
**>It seems to me as if R is wrong--the matrix z is obviously of
**>length(x)+1 times length(y)+1--but just as obviously I'm missing
**>something essential. Are there any "newbie" guides out there for
**>getting started?
**>TIA,
**>
**>Pete
**>
**>
**>
**>---------------------------------
**>
**>
**> [[alternative HTML version deleted]]
**>
**>______________________________________________
**>R-help@stat.math.ethz.ch mailing list
**>https://stat.ethz.ch/mailman/listinfo/r-help
**>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
*

-- -------------------------------------- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.htmlReceived on Sat Jul 16 01:10:06 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:33:45 EST
*