Skip to content
Prev 245392 / 398503 Next

levelplot blocks size

On 19/12/2010 2:46 PM, jonathan wrote:
I don't know what your data looks like, so this is hard.  levelplot 
assumes you have triplets (x,y,z), where x and y only take a few values, 
and it plots the grid of those values using z to set the colour.  In 
your example you read x amd y from a file.  So just round them to fewer 
values, e.g.

df$x <- round(df$x, -2)  # round to -2 decimal places, i.e. to hundreds
df$y <- round(df$y, -2)

levelplot(z ~ x+y, data=df)