A round chart where each slice shows one group’s share of the whole.
pie(x, labels)
Key idea
A pie chart splits a circle into slices that are parts of one whole. (e.g. 40% + 35% + 25% = 100%)
Each slice's angle reflects its share of the total. (e.g. half the pie = 50%)
It works best with only a few categories. (e.g. 3 to 5 slices)
All slices together must add up to 100%.
Hard to compare slices that are close in size by eye. (e.g. 33% vs 31%)
Definition
θi=∑jxjxi×360∘
xi
a single group value
∑jxj
the total of all groups
θi
the slice angle in degrees
In plain words
Cut a whole pie into slices, one slice per group. Just look to see who got the biggest piece — the widest slice wins.
Where you'd use it
A monthly budget splits into rent $1000, food $400, and fun $100. A pie shows rent filling about two-thirds of the circle, making it obvious where most of the money goes.
An election gave three candidates 50%, 30%, and 20% of the vote. The pie cuts into a half-circle slice and two smaller wedges, showing at a glance who won and by how much.
For a day split into sleep 8 h, work 8 h, and play 8 h, the pie shows three equal slices of one-third each, instantly conveying a balanced day.
Worked example 1
How many games sold in each type for Manic Mango: Sports 27,500, Strategy 11,500, Action 6,000, Shooter 3,500, Other 1,500. With one look, Sports grabs the biggest slice.
Frequently asked questions
Pie or bar chart?
Bars are easier to compare. Use a pie only for a few parts of one whole.