On Fri, Mar 26, 2010 at 7:03 AM, Lao Tse <laot...@gmail.com> wrote: > Dear lattice::levelplot users, > > I would like to use levelplot to plot uniformly sized blocks. > > Here is an example: > > require (lattice) > u = runif(10) * 10 > v = runif(10) * 10 > z = runif(10) > levelplot ( z ~ u + v, aspect="iso" ) > > The resultant figures have points (blocks) that are of variable size that > attempt to fill in the space along each u, v dimension. Is it possible to > force each point to have, for example, a size of 1 X 1 unit? I realise this > can be easily accomplished with "image". I also understand that using > lattice::xyplot tweaked with color gradients and square points can also do > the job.
Yes, as in xyplot(v ~ u, aspect="iso" , col = level.colors(z, at = pretty(z, 15)), panel = panel.rect, height = 1, width = 1) > I would, however, like to keep using levelplot which I like very > much and wonder (and hope) if I maybe I have missed some obvious option. You will need to supply a modified panel function (essentially modify the grid.rect() call in panel.levelplot). -Deepayan ______________________________________________ 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.