简体   繁体   中英

Is it possible to create a pie in pie chart in SPSS or R?

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?

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM