[R] lattice contourplot error

Deepayan Sarkar deepayan.sarkar at gmail.com
Mon May 21 21:46:24 CEST 2007

On 5/20/07, Mihai Bisca <mbisca at gmail.com> wrote:
> Hello,
> A weird thing is happening to me. I have a 128x128 elements matrix m
> with values between 0 and 1. If I do:
>       R> library(lattice)
>       R> contourplot (m, cuts=9)
> I get the following error message: Error in validDetails.text(x) :
> Invalid 'rot' value
> The same for any cuts >9.
> I can plot m with contourplot(m, cuts=8) but this is not detailed
> enough. The 'normal' R image and contour commands work just fine so it
> seems there is nothing wrong with the data. What is this 'rot' value ?
> What happens with contourplot from lattice ?

This depends on the data (and I haven't been able to reproduce it),
but I'm pretty sure the culprit is the calculation of the rotation for
the contour labels. You can probably work around it by changing
'label.style' (see ?panel.contourplot). I can try to fix it if you
give me a reproducible example (e.g. save() your matrix and send it to
me offline).


More information about the R-help mailing list