Re: [R] library(Matrix) and image() colors?

From: <jgarcia_at_ija.csic.es>
Date: Thu, 29 May 2008 08:57:34 +0200 (CEST)

Yes ,this work! Uhmm... Strange!
Thanks,
Javier



> On 5/28/08, jgarcia@ija.csic.es <jgarcia@ija.csic.es> wrote:
>> Hi,
>> I'm trying to produce a plot of an image of a Matrix, but I don't get
>> other colors than the default grey scale:
>>
>> > image(Matrix(topo.matrix.2),col.regions=topo.colors(100),colorkey=FALSE)
>>
>> this still is plotted in grey.
>>
>> Is there any mistake in my syntax?
>
> Not sure what the problem is, but although the first call does not
> work, the second one does:
>
> image(Matrix(volcano), col.regions = topo.colors(100), colorkey = TRUE)
>
> image(as(Matrix(volcano), "sparseMatrix"),
> col.regions = topo.colors(100), colorkey = TRUE)
>
> -Deepayan
>


R-help_at_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. Received on Thu 29 May 2008 - 08:46:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 29 May 2008 - 09:30:42 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive