Matplotlib Test
Matplotlib Test
Introduction to Matplotlib
1. You have a list of sales numbers for the past 12 months. How will you visualize
this trend using `matplotlib.pyplot`?
3. Your team needs a quick visual representation of how website traffic changed
daily over the past week. Which `matplotlib` function would you use?
4. You installed Matplotlib but your script shows no graph when you run it. What
basic steps might be missing?
---
2. Basic Plots
5. You want to compare the revenue of five products. Which plot is most suitable
and how would you implement it using `plt.bar()`?
6. A scientist wants to see the relationship between temperature and ice cream
sales. Which plot type should they use?
7. You have percentage data showing the market share of four smartphone brands.
Which plot should you use and how would you apply `plt.pie()`?
8. You have exam scores of 100 students and want to analyze the frequency
distribution. Which plot will you use?
9. Your manager asks for a visual showing the change in employee count over 10
years. Which Matplotlib function will you choose?
10. You want to show the age distribution of a large group of people. How would you
use a histogram to achieve this?
11. You want to plot a graph showing the relation between height and weight of 30
students. Which function will help, and why?
12. You’re asked to visualize the revenue of a company over time. Which plot will
best represent this, and how can you plot it?
---
3. Plot Customization
13. You plotted a graph, but your audience can't understand what it shows. Which
customization features can you use to make it clearer?
14. You created a line plot, but the x-axis and y-axis don’t describe the data
well. How will you add proper axis labels?
15. Your line chart includes three lines for different product sales. How can you
help the viewer distinguish them?
16. A plot looks too plain. How can you enhance its readability using grid lines?
17. Your plot contains multiple data lines and you want to assign different colors,
line styles, and markers to each. How would you do this?
18. After plotting a bar chart, you realize viewers can’t tell which color
represents which item. What feature can solve this issue?
19. You created a plot but forgot to include the chart title. What Matplotlib
function allows you to set it?
20. You’re presenting to a colorblind audience. What steps can you take while
customizing your plot to ensure it’s still readable?