Re: [R] lattice contourplot error

From: Deepayan Sarkar <>
Date: Mon, 21 May 2007 12:46:24 -0700

On 5/20/07, Mihai Bisca <> 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 '' (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).

-Deepayan mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Mon 21 May 2007 - 19:57:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 21 May 2007 - 22:31:18 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.