3D pie

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

3D pie

COMTE Guillaume
Hi all,

 

Is there a way to draw 3D pie with R (like excel does)?

 

I know how to do it in 2D, just by using pie(something)...

 

I know it isn't the best way to represent data, but people are sometimes
more interested by the look and feel than by the accuracy of the
results...

 

If there is no way, have you another suggestion ? (i already use
dotchart instead of pie)

 

Thks to all of you.

COMTE Guillaume


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D pie

Patrick Burns
You can see my opinion of 3D piecharts at

http://www.burns-stat.com/pages/Tutor/spreadsheet_addiction.html

Patrick Burns
[hidden email]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")

COMTE Guillaume wrote:

>Hi all,
>
>
>
>Is there a way to draw 3D pie with R (like excel does)?
>
>
>
>I know how to do it in 2D, just by using pie(something)...
>
>
>
>I know it isn't the best way to represent data, but people are sometimes
>more interested by the look and feel than by the accuracy of the
>results...
>
>
>
>If there is no way, have you another suggestion ? (i already use
>dotchart instead of pie)
>
>
>
>Thks to all of you.
>
>COMTE Guillaume
>
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>[hidden email] mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>
>  
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D pie

Martin Maechler
>>>>> "PatBurns" == Patrick Burns <[hidden email]>
>>>>>     on Tue, 18 Apr 2006 19:09:25 +0100 writes:

    PatBurns> You can see my opinion of 3D piecharts at
    PatBurns> http://www.burns-stat.com/pages/Tutor/spreadsheet_addiction.html

    PatBurns> Patrick Burns [hidden email] +44 (0)20
    PatBurns> 8525 0696 http://www.burns-stat.com (home of S
    PatBurns> Poetry and "A Guide for the Unwilling S User")

Indeed!
Or:
   If you real want to commit the crime of producing 3D pies,
   then please do not abuse a beatiful software like R,
   but stay with poor man's Excel!

Martin Maechler, ETH Zurich


    PatBurns> COMTE Guillaume wrote:

    >> Hi all,
    >>
    >>
    >>
    >> Is there a way to draw 3D pie with R (like excel does)?
    >>
    >>
    >>
    >> I know how to do it in 2D, just by using
    >> pie(something)...
    >>
    >>
    >>
    >> I know it isn't the best way to represent data, but
    >> people are sometimes more interested by the look and feel
    >> than by the accuracy of the results...
    >>
    >>
    >>
    >> If there is no way, have you another suggestion ? (i
    >> already use dotchart instead of pie)
    >>
    >>
    >>
    >> Thks to all of you.
    >>
    >> COMTE Guillaume
    >>
    >>
    >> [[alternative HTML version deleted]]
    >>
    >> ______________________________________________
    >> [hidden email] mailing list
    >> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do
    >> read the posting guide!
    >> http://www.R-project.org/posting-guide.html
    >>
    >>
    >>
    >>

    PatBurns> ______________________________________________
    PatBurns> [hidden email] mailing list
    PatBurns> https://stat.ethz.ch/mailman/listinfo/r-help
    PatBurns> PLEASE do read the posting guide!
    PatBurns> http://www.R-project.org/posting-guide.html

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D pie

Bert Gunter
For more comments on this sort of thing, google on "chartjunk."

-- Bert

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Martin Maechler
> Sent: Tuesday, April 18, 2006 11:55 PM
> To: COMTE Guillaume
> Cc: [hidden email]; Patrick Burns
> Subject: Re: [R] 3D pie
>
> >>>>> "PatBurns" == Patrick Burns <[hidden email]>
> >>>>>     on Tue, 18 Apr 2006 19:09:25 +0100 writes:
>
>     PatBurns> You can see my opinion of 3D piecharts at
>     PatBurns>
> http://www.burns-stat.com/pages/Tutor/spreadsheet_addiction.html
>
>     PatBurns> Patrick Burns [hidden email] +44 (0)20
>     PatBurns> 8525 0696 http://www.burns-stat.com (home of S
>     PatBurns> Poetry and "A Guide for the Unwilling S User")
>
> Indeed!
> Or:
>    If you real want to commit the crime of producing 3D pies,
>    then please do not abuse a beatiful software like R,
>    but stay with poor man's Excel!
>
> Martin Maechler, ETH Zurich
>
>
>     PatBurns> COMTE Guillaume wrote:
>
>     >> Hi all,
>     >>
>     >>
>     >>
>     >> Is there a way to draw 3D pie with R (like excel does)?
>     >>
>     >>
>     >>
>     >> I know how to do it in 2D, just by using
>     >> pie(something)...
>     >>
>     >>
>     >>
>     >> I know it isn't the best way to represent data, but
>     >> people are sometimes more interested by the look and feel
>     >> than by the accuracy of the results...
>     >>
>     >>
>     >>
>     >> If there is no way, have you another suggestion ? (i
>     >> already use dotchart instead of pie)
>     >>
>     >>
>     >>
>     >> Thks to all of you.
>     >>
>     >> COMTE Guillaume
>     >>
>     >>
>     >> [[alternative HTML version deleted]]
>     >>
>     >> ______________________________________________
>     >> [hidden email] mailing list
>     >> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do
>     >> read the posting guide!
>     >> http://www.R-project.org/posting-guide.html
>     >>
>     >>
>     >>
>     >>
>
>     PatBurns> ______________________________________________
>     PatBurns> [hidden email] mailing list
>     PatBurns> https://stat.ethz.ch/mailman/listinfo/r-help
>     PatBurns> PLEASE do read the posting guide!
>     PatBurns> http://www.R-project.org/posting-guide.html
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D pie

Gabor Grothendieck
In reply to this post by COMTE Guillaume
Since everyone else wimped out with a tedious you-do-not-want-to-do-that,
here is a solution that uses R to control Excel and create a 3d chart.
 You will
need the RDCOMclient package that you can find via google.


library(RDCOMClient)
xl <- COMCreate("Excel.Application")  # starts up Excel
xl[["Visible"]] <- TRUE                       # Excel becomes visible
wkbk <- xl$Workbooks()$Add()          # new workbook

# set some cells

sh <- xl$ActiveSheet()

for(i in 1:5) {
  lab <- sh$Cells(i,1)
  lab[["Value"]] <- letters[i]
  val <- sh$Cells(i,2)
  val[["Value"]] <- i
}

ch <- xl$Charts()
ch$Add()

ac <- xl$ActiveChart()
xl3DPieExploded <- 70
ac[["ChartType"]] <- xl3DPieExploded
       
xlColumn <- 2
ac$SetSourceData(Source = sh$Range("A1:B5"), PlotBy = xlColumn)

# now right click the chart and make any other settings you like.


On 4/18/06, COMTE Guillaume <[hidden email]> wrote:

> Hi all,
>
>
>
> Is there a way to draw 3D pie with R (like excel does)?
>
>
>
> I know how to do it in 2D, just by using pie(something)...
>
>
>
> I know it isn't the best way to represent data, but people are sometimes
> more interested by the look and feel than by the accuracy of the
> results...
>
>
>
> If there is no way, have you another suggestion ? (i already use
> dotchart instead of pie)
>
>
>
> Thks to all of you.
>
> COMTE Guillaume
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D pie

Rolf Turner-2
In reply to this post by COMTE Guillaume

Gabor Grothendieck wrote:

> Since everyone else wimped out with a tedious you-do-not-want-to-do-that,
> here is a solution that uses R to control Excel and create a 3d chart.
    .
    .
    .

People really ***should not*** be encouraged or abetted in
wrong-headedness.  Excel is terrible.  Pie charts are terrible.
Don't mess with them.  Period.


                        cheers,

                                Rolf Turner
                                [hidden email]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D pie

Frank Harrell
Rolf Turner wrote:

> Gabor Grothendieck wrote:
>
>
>>Since everyone else wimped out with a tedious you-do-not-want-to-do-that,
>>here is a solution that uses R to control Excel and create a 3d chart.
>
>     .
>     .
>     .
>
> People really ***should not*** be encouraged or abetted in
> wrong-headedness.  Excel is terrible.  Pie charts are terrible.
> Don't mess with them.  Period.
>
>
> cheers,
>
> Rolf Turner
> [hidden email]

I second that.  Helping people do things known to have major problems
with the approaches can actually hurt others in the long run.  2-D pie
charts are terrible.  That makes 3-D pie charts terrible to the 3/2
power.  Excel has serious errors and is not a good model for
reproducible research.
--
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Frank Harrell
Department of Biostatistics, Vanderbilt University
Reply | Threaded
Open this post in threaded view
|

Re: 3D pie

P Ehlers
This discussion of 3-d pie charts comes at an opportune time. I have
just formulated a new theory of graphical information transfer which
is particularly simple in the case of 3-d pie charts.

Let theta denote the angle between the normal to the pie cylinder and
the pie-eyed line (connecting eye and centre of pie). Then the
information transmitted from pie to viewer is

   K * (pi/2 - theta)^3

for theta in [0, pi/2]. The normalizing constant may be written in
the obvious manner as

   K = 8 * I_0 / pi^3.

I conjecture that I_0 is not large, but I'm still waiting to hear
from Microsoft regarding my application for funding to allow me to
conduct extensive testing.

I'm also working on higher-dimensional generalizations, but even
the 4-d case does not seem to be simple.

Peter Ehlers


Frank E Harrell Jr wrote:

> Rolf Turner wrote:
>
>>Gabor Grothendieck wrote:
>>
>>
>>
>>>Since everyone else wimped out with a tedious you-do-not-want-to-do-that,
>>>here is a solution that uses R to control Excel and create a 3d chart.
>>
>>    .
>>    .
>>    .
>>
>>People really ***should not*** be encouraged or abetted in
>>wrong-headedness.  Excel is terrible.  Pie charts are terrible.
>>Don't mess with them.  Period.
>>
>>
>> cheers,
>>
>> Rolf Turner
>> [hidden email]
>
>
> I second that.  Helping people do things known to have major problems
> with the approaches can actually hurt others in the long run.  2-D pie
> charts are terrible.  That makes 3-D pie charts terrible to the 3/2
> power.  Excel has serious errors and is not a good model for
> reproducible research.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D pie

Gabor Grothendieck
In reply to this post by Frank Harrell
On 4/19/06, Frank E Harrell Jr <[hidden email]> wrote:

> Rolf Turner wrote:
> > Gabor Grothendieck wrote:
> >
> >
> >>Since everyone else wimped out with a tedious you-do-not-want-to-do-that,
> >>here is a solution that uses R to control Excel and create a 3d chart.
> >
> >     .
> >     .
> >     .
> >
> > People really ***should not*** be encouraged or abetted in
> > wrong-headedness.  Excel is terrible.  Pie charts are terrible.
> > Don't mess with them.  Period.
> >
> >
> >                       cheers,
> >
> >                               Rolf Turner
> >                               [hidden email]
>
> I second that.  Helping people do things known to have major problems
> with the approaches can actually hurt others in the long run.  2-D pie
> charts are terrible.  That makes 3-D pie charts terrible to the 3/2
> power.  Excel has serious errors and is not a good model for
> reproducible research.

But since R is controlling Excel you could reproduce the chart simply
by rerunning the R code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D pie

Ted.Harding
In reply to this post by P Ehlers
On 19-Apr-06 Peter Ehlers wrote:

> This discussion of 3-d pie charts comes at an opportune time. I have
> just formulated a new theory of graphical information transfer which
> is particularly simple in the case of 3-d pie charts.
>
> Let theta denote the angle between the normal to the pie cylinder and
> the pie-eyed line (connecting eye and centre of pie). Then the
> information transmitted from pie to viewer is
>
>    K * (pi/2 - theta)^3
>
> for theta in [0, pi/2]. The normalizing constant may be written in
> the obvious manner as
>
>    K = 8 * I_0 / pi^3.
>
> I conjecture that I_0 is not large, but I'm still waiting to hear
> from Microsoft regarding my application for funding to allow me to
> conduct extensive testing.

I think I can confirm your conjecture. With theta = 0, you have in
effect a 2-D pie, and then, according to my calculations, if you take

  I_0 = 3.14159265358979...

the information you get is 1 pie.

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <[hidden email]>
Fax-to-email: +44 (0)870 094 0861
Date: 20-Apr-06                                       Time: 09:10:01
------------------------------ XFMail ------------------------------

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D pie

COMTE Guillaume
In reply to this post by COMTE Guillaume
Hi all,
I can understand that it isn't the right way to represent data, i knew that i would hurt some people on this mailling list to discuss about pie.
As i've specified on my first message:
My only purpose of drawing 3D pie is for customer who don't have to understand what is drawn , but only be impressed by the beauty of the result (like people at commercial division which purchase what you've done but don't use it).

Then the expert (who are the ending users) will use the dotchart version (which i've putted too) instead of the pie.
Note:it isn't my idea, i wish to follow these advices, but i'm not the buyer...

That's all, and for shure i won't forget that pie isn't good, or only at dinner time.

Bring me a 3D apple pie and a coffee it's the morning here! (or a sandwich with hamm)

Thks for all the answers,

Grothendieck, thanks for the R tips with excel,but i'm working under linux, will keep this example in a safe place, could be usefull one day, who knows...

Cheers
COMTE Guillaume
 


-----Message d'origine-----
De : Frank E Harrell Jr [mailto:[hidden email]]
Envoyé : mercredi 19 avril 2006 21:14
À : Rolf Turner
Cc : [hidden email]; COMTE Guillaume; [hidden email]
Objet : Re: [R] 3D pie

Rolf Turner wrote:

> Gabor Grothendieck wrote:
>
>
>>Since everyone else wimped out with a tedious you-do-not-want-to-do-that,
>>here is a solution that uses R to control Excel and create a 3d chart.
>
>     .
>     .
>     .
>
> People really ***should not*** be encouraged or abetted in
> wrong-headedness.  Excel is terrible.  Pie charts are terrible.
> Don't mess with them.  Period.
>
>
> cheers,
>
> Rolf Turner
> [hidden email]

I second that.  Helping people do things known to have major problems
with the approaches can actually hurt others in the long run.  2-D pie
charts are terrible.  That makes 3-D pie charts terrible to the 3/2
power.  Excel has serious errors and is not a good model for
reproducible research.
--
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D pie

barry rowlingson
In reply to this post by Rolf Turner-2
Rolf Turner wrote:

>
> People really ***should not*** be encouraged or abetted in
> wrong-headedness.  Excel is terrible.  Pie charts are terrible.
> Don't mess with them.  Period.
>

  Now I realise the opportunity I missed on April 1st, when I was going
to try and (anonymously) post the most flammable R-help posting ever.
Something like:

  "I'm trying to make a library with R 1.6.1 to create a 3-d pie chart
in excel but seq(0,1,by=0.1)[4]==0.3 is false".


Barry

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D pie

Stuart Leask
In reply to this post by Ted.Harding
> On 19-Apr-06 Peter Ehlers wrote:
>> This discussion of 3-d pie charts comes at an opportune time. I have
>> just formulated a new theory of graphical information transfer which
>> is particularly simple in the case of 3-d pie charts.
>>
>> Let theta denote the angle between the normal to the pie cylinder and
>> the pie-eyed line (connecting eye and centre of pie). Then the
>> information transmitted from pie to viewer is
>>
>>    K * (pi/2 - theta)^3
>>
>> for theta in [0, pi/2]. The normalizing constant may be written in
>> the obvious manner as
>>
>>    K = 8 * I_0 / pi^3.
>>
>> I conjecture that I_0 is not large, but I'm still waiting to hear
>> from Microsoft regarding my application for funding to allow me to
>> conduct extensive testing.
>
> I think I can confirm your conjecture. With theta = 0, you have in
> effect a 2-D pie, and then, according to my calculations, if you take
>
>  I_0 = 3.14159265358979...
>
> the information you get is 1 pie.
>
> Ted.

Unless you cut it into quarters, in which case you have that rare situation
where pie by two equals pie by four!!!!...
... sorry ....

Stuart



This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: 3D pie

Michael A. Miller
In reply to this post by COMTE Guillaume
>>>>> "COMTE" == COMTE Guillaume <[hidden email]> writes:

    > I know it isn't the best way to represent data, but people
    > are sometimes more interested by the look and feel than by
    > the accuracy of the results...

If they aren't intersted in the results, why not just print some
random 3D pie chart and use that?  Why do you need to produce a
new one at all?

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html