On 19/12/2010 2:46 PM, jonathan wrote:

Duncan,

Thanks for the help.

I'm new to R, so I'm not sure how to get R to round the values and "group"
them into larger blocks.

I have tried the following:

xlim=seq(0,2000,100),ylim=seq(0,2000,100)

just to see if it would work, but it doesn't...

Do you think you might be able to explain how to go about rounding the
values?

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)

______________________________________________
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.

Reply via email to