# Spie charts

6 messages
Open this post in threaded view
|

## Spie charts

 Dear ∀, Ist there a function to plot "spie charts" in R? https://en.wikipedia.org/wiki/spie_chart(These are a combination of pie charts and radial pie charts, where the angle represents one dimension and the radius of the respective sector another dimension) Thank you in advance! ______________________________________________ [hidden email] mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: Spie charts

Open this post in threaded view
|

## Re: Spie charts

 In reply to this post by Mag. Ferri Leberl Hi Ferri, There are a number of variations on the pie chart. The fan.plot, radial.pie and starPie functions in the plotrix package are but a few. There are two really important considerations in using plots like this: 1) Does the plot illustrate what you want? For example, if you want to show that more of the A people get COVID than B people, but also that there are more of them in the population, you could probably do this with what you are suggesting. 2) Do the viewers get it? This is the most important part. You know what is happening, but is that information clear to the viewer. Try it out on unsuspecting co-workers without explanation. Bert is right, Florence Nightingale's "coxcomb" is an early attempt at doing this sort of thing. Jim On Mon, Mar 29, 2021 at 2:59 AM Ferri Leberl <[hidden email]> wrote: > > Dear ∀, > Ist there a function to plot "spie charts" in R? > https://en.wikipedia.org/wiki/spie_chart> (These are a combination of pie charts and radial pie charts, where the angle represents one dimension and the radius of the respective sector another dimension) > Thank you in advance! > > ______________________________________________ > [hidden email] mailing list -- To UNSUBSCRIBE and more, see > 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. ______________________________________________ [hidden email] mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: Spie charts

 In reply to this post by Mag. Ferri Leberl I couldn't find a predefined function for this purpose. However, it wouldn't be too difficult to write a pair of functions. The big question is how flexible does the rendering function need to be? #plot from angles, distances, etc #(angles on arbitrary scale) spiechart.render <- function (     angle=1, distance, ...,     circd= stdd, labd = 1.25 * stdd,     main="", labs="", line.col="black", area.col="white",     stdd = mean (distance) ) {   n <- length (distance)     angle <- rep_len (angle, n)     angle <- 2 * pi * angle / sum (angle)     } #compute angles and distances, from data #(then call rendering function) spiechart <- function (         spiechart.render (angle, distance, ...) } Partially off-topic remarks: I know there's some criticism of this approach. However, the OP never stated the purpose. And this approach could be useful in some cases. Say for modelling certain ecological or weather events. Where for each event, there's a categorical date (such as month) and a magnitude/etc. And then, in the top level function from above, the angles and distances would be the result of aggregation functions. On Mon, Mar 29, 2021 at 4:59 AM Ferri Leberl <[hidden email]> wrote: > > Dear ∀, > Ist there a function to plot "spie charts" in R? > https://en.wikipedia.org/wiki/spie_chart> (These are a combination of pie charts and radial pie charts, where the angle represents one dimension and the radius of the respective sector another dimension) > Thank you in advance! > > ______________________________________________ > [hidden email] mailing list -- To UNSUBSCRIBE and more, see > 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. ______________________________________________ [hidden email] mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.