Is it possible to create a pie in pie chart in SPS

2019-02-27 17:51发布

问题:

I know it is possible to create such double pie charts in excel like this:

http://chandoo.org/wp/2009/12/02/group-small-slices-in-pie-charts/

but can SPSS or R do this also?

回答1:

In relation to R:

The answer to the title question is "yes" ... see ?pie

As for the second question, the one in the body - it would be possible but would involve some coding. You'd have to draw two pie charts side by side (which could be managed with two calls to pie) and use segments or arrows (and text if necessary) to do the additional components of the plot.

Here's a rough example:

That required the fig argument of par to get them side-by-side.

(That example required a little fiddling to get right, but it would be possible to write a function to automate the details.)

The main issue I can see would be 'why on earth would you do it?' -- pie charts are a poor way of conveying information of this form. There are alternatives that result in much better ability to distinguish values, and less bias (such as what you get when comparing nearly horizontal vs nearly vertical slices).



标签: r spss pie-chart