What does the explode property in the pie chart do?
What does the explode property in the pie chart do?
Solution
✅ Correct Option: 3
In Matplotlib's pie(), explode takes a sequence with one value per slice. Each value is the fraction of the radius by which that slice is moved away from the centre. For example, explode=[0, 0.1, 0, 0] pulls out only the second slice by 10% of the radius.
Option 1: the border is set through wedgeprops (for example edgecolor and linewidth).
Option 2: slice colours are set with the colors parameter.
Option 4: the starting angle and direction are controlled by startangle and counterclock.
Related questions:
2026: 18 May Shift 2
2025: 3 June Shift 2
2026: 24 May Shift 1
2025: 30 May Shift 2
2026: 21 May Shift 1