Histogram is a plot of code example
Example 1: matplotlib histograms
# Import packages
import matplotlib.pyplot as plt
%matplotlib inline
# Create the plot
fig, ax = plt.subplots()
# Plot the histogram with hist() function
ax.hist(x, edgecolor = "black", bins = 5)
# Label axes and set title
ax.set_title("Title")
ax.set_xlabel("X_Label")
ax.set_ylabel("Y_Label")
Example 2: what is histogram
A histogram is an approximate representation of the distribution of numerical data.