Skip to content
Prev 245038 / 398503 Next

levelplot blocks size

Hi,

I am trying to produce a levelplot using the following:

library(lattice)
df <- read.table("data", sep="\t", header=TRUE)

gr = levelplot(df$z ~ df$x * df$y,
xlim=0:1000,ylim=0:1000,aspect="iso",col.regions=heat.colors)
print(gr)

The produced result is: http://dl.dropbox.com/u/25473/bigplot.png

Now this is correct, because each of those points have a very low z value,
but what I'm more interested in is grouping these values together and
plotting a larger point for all of those smaller points.

For example, when I limit the x and y axes further, I get the following
(where x and y axes are limit to 0:10):

http://dl.dropbox.com/u/25473/smallplot.png

Now this is good, but this data gets totally lost when plotted like in the
first example, so I need to create larger "blocks", then compute a z value
for that entire block.

The question is: how do I do this?

Any help much appreciated!

Thanks,

Jonathan