To develop a histogram, follow these means −
1. Bin the scope of values.
2. Partition the whole scope of values into a progression of stretches.
3. Count the number of values that fall into every stretch.
The containers are typically indicated as sequential, non-covering time periods variable.
work plots a histogram. It processes and draws the histogram of x.
from matplotlib import pyplot as plt
import numpy as np
fig,ax = plt.subplots(1,1>
a = np.array([22,87,5,43,56,73,55,54,11,20,51,5,79,31,27]>
ax.hist(a, bins = [0,25,50,75,100]>
ax.set_title("histogram of result">
ax.set_ylabel('no. of students'>