Re: [R] lattice contourplot error

From: Deepayan Sarkar <deepayan.sarkar_at_gmail.com>
Date: Mon, 21 May 2007 15:14:06 -0700

On 5/21/07, Mihai Bisca <mbisca_at_gmail.com> wrote:
> On 5/21/07, Deepayan Sarkar <deepayan.sarkar@gmail.com> wrote:
>
> > > I get the following error message: Error in validDetails.text(x) :
> > > Invalid 'rot' value
>
> > 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).
>
> Thank you for your interest. I'm new to R, but pretty enthusiastic
> about it. You can find attached the matrix in question. It's a
> representation of an optic disc from a retinal photograph.
>
> I noticed that the error occurs only when using the option 'pretty=T'.
> Also, it happens in two of about seven or eight similar objects I
> played with.

Cool example. It's a problem with the label rotation calculation (some are NaN, so presumably there's a division by zero somewhere). I'll try to track it down.

For your example, I don't think labels are going to be of any use, so I would suggest you try something like

contourplot(bd.cn, cuts = 20, labels = FALSE)

or

levelplot(bd.cn)

both of which should be fine.

-Deepayan



R-help_at_stat.math.ethz.ch 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. Received on Mon 21 May 2007 - 22:18:29 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 - 23:31:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.