FAQ: Different Plot Types - Pie Chart

This community-built FAQ covers the “Pie Chart” exercise from the lesson “Different Plot Types”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Data Visualization in Python

FAQs on the exercise Pie Chart

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

Why does pyplot draw a pie chart that appears tilted as the default?

2 Likes

Please don’t use pie charts in your professional life. Humans are terrible at eyeballing proportions. Pie charts are only effective with heavy labeling, in which case you may as well just tabulate the percentages of each category.

1 Like

I also would like to know this, from my point of view, if anything a tilted chart should be an option, not the norm. Maybe there’s something we’re not seeing here?

1 Like

Is this phenomenon, that the pyplot pie chart appears tilted by default, a feature of the Codecademy environment (codecademylib library)? I haven’t seen allusions to this pie tilting phenomenon anywhere else. Also, in the w3schools environment the tilting doesn’t happen, and without calling plt.axis().

I can’t see what lesson this is referring to b/c this post is from 2018 and that content has been moved.

When in doubt, check the documentation:

https://matplotlib.org/stable/gallery/pie_and_polar_charts/pie_and_donut_labels.html

This lesson

Well, did you try creating a chart outside the CC LE? (in Jupyter Notebook).

Adding a title has nothing to do with plt.axis(). You have to use plt.title("blah")