Exercise: Matplotlib Basics

This exercise helps you practise the core Matplotlib skills needed to create clear charts for analysis and reporting. The goal is to build confidence in selecting the right chart type, plotting correctly, and adding labels so the chart is easy to understand.

Step 1 is preparing a small dataset. Use a simple dataset with a numeric column and a category or date column. For example, monthly sales, daily website visits, product-wise revenue, or student scores. Load it into a Pandas DataFrame so you can plot easily.

Step 2 is creating a basic line chart. Plot a trend over time, such as sales by month. Add a title, x-axis label, and y-axis label. Make sure the x-axis values are readable.

Step 3 is creating a bar chart. Summarise your data by a category, such as sales by region or revenue by product, and plot it as a bar chart. Sort the categories so the chart is easier to read, and add labels.

Step 4 is exploring distribution with a histogram. Choose a numeric column such as scores, order values, or customer spending, and plot a histogram. Adjust the number of bins to see how the distribution changes. Add a clear title and axis labels.

Step 5 is creating a scatter plot to check relationships. Pick two numeric variables such as marketing spend and sales, or study hours and marks, and plot a scatter chart. Add labels and a title.

Step 6 is saving and documenting. Save at least one plot as an image file. Then write a short note for each chart explaining what it shows and one insight you can take from it.

By the end of this exercise, you should be comfortable creating line, bar, histogram, and scatter plots with proper labeling and basic formatting.

Matplotlib: Pandas Plotting
Anaconda Installation

Get industry recognized certification – Contact us

keyboard_arrow_up