On 26 February 2010 11:12, Lorenzo Isella wrote:
> Thanks Augustine and Jim for the prompt reply.
> You both answered my question. To avoid another post, I would simply like to
> know if something along these lines is doable also with ggplot2.
> Many thanks
>
> Lorenzo
>
Augustine???
Anyhow, wi
What about
http://www.phaget4.org/R/image_matrix.html
try function "f.matrix.plot"
Tobias Mathow
Forest Research Institute Baden-Wuerttemberg (FVA)
Wonnhaldestr. 4, D- 79100 Freiburg
Phone: ++49-761-4018-365
www.fva-bw.de
-Ursprüngliche Nachricht-
Von: r-help-boun...@r-project.org
baptiste auguie wrote:
Hi,
A minimalist example using Grid graphics,
library(RGraphics)
bwImage <- function(m, cols=c("white", "black"),
draw=TRUE, gp=gpar()){
g <- imageGrob(nrow(m), ncol(m),
cols=cols[m+1], gp=gp)
if(draw)
grid.draw(g)
return(g)
}
m
On 02/26/2010 07:29 PM, Lorenzo Isella wrote:
Dear All,
Consider a matrix (N x N) where each entry is either zero or one (can
hardly get any simpler).
Now, I would like to plot it as a 'chessboard' where every matrix entry
is a black (1) or white (0) square.
Whatever tool I use to plot it, it sho
Hi,
A minimalist example using Grid graphics,
library(RGraphics)
bwImage <- function(m, cols=c("white", "black"),
draw=TRUE, gp=gpar()){
g <- imageGrob(nrow(m), ncol(m),
cols=cols[m+1], gp=gp)
if(draw)
grid.draw(g)
return(g)
}
m <- matrix(rnorm(200) > 0,
5 matches
Mail list logo