Introduction
In this lab, you will learn how to create and customize histograms using Matplotlib, one of the most popular data visualization libraries in Python. A histogram is a powerful tool for visualizing the distribution of a numerical dataset. It groups numbers into ranges (or "bins") and displays the frequency of data points falling into each bin.
You will go through the following steps:
- Generate sample data using NumPy.
- Create a basic histogram.
- Customize the number of bins.
- Change the color and edge style of the histogram bars.
- Normalize the histogram to show probability density.
By the end of this lab, you will be able to generate informative and visually appealing histograms for your data analysis projects. All plots will be saved as image files, which you can view directly in the LabEx WebIDE.








