Skip to main contentSkip to solution

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.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question