ogbos okike schreef:
Hi,
I am trying to use the image function to do a color plot. My matrix columns
are labeled y and x. I tried >image(y, x) but I had error message ("Error in
image.default(y, x) : increasing 'x' and 'y' values expected").
Could anybody please tell me how to add these increasing 'x' and 'y' values.
Thanks

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Hi,

Please provide a reproducible example.

An example that works with image:

x = 1:10
y = seq(1,100,by =10)
z = matrix(runif(100), 10, 10)
image(x,y,z)
x = sort(runif(10))
y = sort(runif(10))
image(x,y,z)

So z is a matrix with the values and x and y tell the dimensions of each cell, often with equal interval.

cheers,
Paul

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to