2
$\begingroup$

I am trying to create a presentation with the fundamental of using Mathematica in Greek.

Normally I use Mathematica to present solutions to ODE problems.

Now I would like to create a pie chart with 10 identical segments in size 2.

I know that the code which creates a pie chart with 10 pieces is

PieChart[Range[10]]

My expectations of the result of the following code are as the following image shows.

PieChart[{2, 2, 2, 2, 2, 2, 2, 2, 2, 2}]

enter image description here

My problem is the identical segments I don't know how to define them in a shorter way.

Any suggestions?

$\endgroup$
4
  • 1
    $\begingroup$ Something like PieChart[Table[2,10]] ? $\endgroup$
    – rhermans
    Dec 15, 2022 at 11:42
  • $\begingroup$ @rhermans yes that is very helpful. Thank you $\endgroup$ Dec 15, 2022 at 11:44
  • $\begingroup$ @Syed Thank you very much! $\endgroup$ Dec 15, 2022 at 11:48
  • $\begingroup$ You're welcome. I deleted my comment as the page updated and I found that the variation was already included in the answer. $\endgroup$
    – Syed
    Dec 15, 2022 at 13:33

1 Answer 1

4
$\begingroup$

You can use Table

PieChart[Table[2,10]]

or ConstantArray

PieChart@ConstantArray[2, 10]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.