[R] possible bug in image() ??

vincent@7d4.com vincent at 7d4.com
Mon Oct 10 08:17:05 CEST 2005


Gareth Davies a Ã©crit :

> Hi everyone. 
> The function image() seems not to be correctly plotting some 
> matrices that I give it. (Iâ€™m using R 2.1.1)   
> ..where the first column in x  (vector ccc) is depicted 
> horizontally along the bottom of the image. 

Hello,
here's a way to have an image according the usual view.

timage = function(M)
{
M1 = M;
for (i in 1:nrow(M)) M1[i,] = M[nrow(M)-i+1,];
image(t(M1));
}

hih




More information about the R-help mailing list