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$ Commented Dec 15, 2022 at 11:42
  • $\begingroup$ @rhermans yes that is very helpful. Thank you $\endgroup$ Commented Dec 15, 2022 at 11:44
  • $\begingroup$ @Syed Thank you very much! $\endgroup$ Commented 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$ Commented 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$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.