Re: [R] Windrose Percent Interval Frequencies Are Non Linear! Help!

From: Peter Ehlers <>
Date: Fri, 08 Apr 2011 11:05:31 -0700

On 2011-04-08 09:26, Ben Bolker wrote:
> Brittain Briber<brittbriber<at>> writes:
>> Do you two or anyone
>> else out there happen to know if it is possible to specify the
>> width of the intervals in windrose? Is there
>> a parameter that I can pass along that would do this?
>> Below is a reproducible script in which you can see
>> the uneven interval spacing. And thanks again for your answers.
>> Best
>> Britt
> The "Details" of ?windrose in circular says
> quite explicitly that it preserves the areas of "pedals" [sic],
> so it's unlikely that this is adjustable without hacking the
> code. (Hmmm, maybe I will write to the maintainers and ask
> them to correct the spelling of "petals" throughout ...)
> On the other hand, there are a *lot* of alternative windrose/circular
> histogram-plotting functions out there in CRAN-contrib-land.
> library("sos"); findFn("wind rose") finds them in packages
> plotrix, openair, oce, climatol, IDPmisc, ggplot2 ... and
> that's not counting rose.diag in the CircStats package.
> I would take a quick look and see if any of those packages
> work for you.
> Ben Bolker


I think that Ben is correct: you would have to hack the code. Here's a way around that, but it just seems to show up another problem in windrose():

   x <- circular(runif(100, 0, 360), units="degrees")    y <- rgamma(100, 15)
   DF <- data.frame(x, y)
   windrose(DF, fill.col='yellow', cir.ind=NULL)

## now superpose a set of circles

   symbols(matrix(0,5,2), circles=1:5/5, inches=FALSE,

           fg="red", add=TRUE)

There is obviously a problem with the aspect ratio and I think it's in windrose(). Here's a more pronounced look at the problem:

   windrose(DF, fill.col='yellow', cir.ind=NULL, bins=1)
   symbols(0, 0, circles=1, inches=FALSE,
           fg="red", add=TRUE)

You could also have a look at the function in the plotrix package.

Peter Ehlers

> ______________________________________________
> mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Fri 08 Apr 2011 - 18:08:42 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 Fri 08 Apr 2011 - 19:30:27 GMT.

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

list of date sections of archive