4. Creating a Histogram. In Matplotlib, you can create a histogram to visualize the distribution of numerical data. You can use the plt.hist() function to create histograms.
For example, you can create a histogram of data values like this: import matplotlib.pyplot as plt; plt.hist(data, bins).
In the exercise below, you will create a histogram.