The histogram plot is used to draw the distribution of a continuous variable. Continuous variable values are split into the required number of bins and plotted on the x axis, and the count of values that fall in each of the bins is plotted on the y axis. On the y axis, instead of count, we can also plot percentage of total, in which case it represents probability distribution. This plot is typically used in statistical analysis.
Histogram
Getting ready
We will use the example of data on prior work experience of participants in a lateral training program. Experience is measured in number of years.
Import the required libraries:
import matplotlib.pyplot as plt
import numpy as np