library(grid)
windowGrob = function(colours, gp = gpar(), vp=NULL, draw=TRUE, ...) {
fillm = matrix(colours, ncol= n2mfrow(length(colours))[2] )
g = rasterGrob(fillm, x = unit(0.5, "npc"), y = unit(0.5,
"npc"), width = unit(1, "npc"), height = unit(1,
"npc"),..., interpolate=FALSE,
gp = gp, vp = vp)
if (draw) grid.draw(g)
invisible(g)
}
windowGrob(palette()[1:4])
HTH,
baptiste
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2