Learn
Recreate Graphs using Matplotlib!
Labeled Pie Chart

Now, we are going to look at the chart called pie.png. This displays what students think the hardest topic covered throughout your math course is.

pie

The data you will need to recreate this chart is in the lists unit_topics and num_hardest_reported.

Save your recreated chart to a file called my_pie_chart.png.

Instructions

1.

Create a figure of width 10 and height 8.

2.

Plot the num_hardest_reported list as a pie chart.

3.

Set the axes to be 'equal'.

4.

Label the slices with the unit_topics list and put a percentage label on each slice, rounded to the nearest int.

5.

Add the title "Hardest Topics".

6.

Save your figure to a file called my_pie_chart.png.

Folder Icon

Sign up to start coding

Already have an account?