This community-built FAQ covers the “Visualizing Data with Matplotlib and Seaborn” exercise from the lesson “Why Data Science?”.
Paths and Courses
This exercise can be found in the following Codecademy content:
FAQs on the exercise Visualizing Data with Matplotlib and Seaborn
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? 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!
plt.show() does nothing… I tried in Chrome and Firefox, but in neither one does a plot appear although the instruction checkmark goes green as though everything worked.
What does the following code do?
y_upper = [i + (i*0.15) for i in viewers_hour]
I think there’s a bug in the browser. The code doesn’t actually do anything so nothing should print out. If you click to the next exercise it should show the plotting code in full.
sets variable i to viewers_hour and does a mathematical function on it. Essentially with the plt.fill_between code draws in the shading around the line
viewers_hour = [30, 17, 34, 29, 19, 14, 3, 2, 4, 9, 5, 48, 62, 58, 40, 51, 69, 55, 76, 81, 102, 120, 71, 63]
why the values are set in that order?
What is the code ax = plt.subplot() doing here? I tried removing it and running the code but I did not see anything change.