matplotlib.pyplot histogram code example
Example 1: matplotlib histogram
import matplotlib.pyplot as plt
data = [1.7,1.8,2.0,2.2,2.2,2.3,2.4,2.5,2.5,2.5,2.6,2.6,2.8,
2.9,3.0,3.1,3.1,3.2,3.3,3.5,3.6,3.7,4.1,4.1,4.2,4.3]
plt.hist(data, range=(1,4), bins=8)
plt.show()
Example 2: matplotlib histograms
import matplotlib.pyplot as plt
%matplotlib inline
fig, ax = plt.subplots()
ax.hist(x, edgecolor = "black", bins = 5)
ax.set_title("Title")
ax.set_xlabel("X_Label")
ax.set_ylabel("Y_Label")
Example 3: matplotlib histogram python
import pyplot from matplotlib as plt
plt.hist(x_axis_list, y_axis_list)
Example 4: matplolib histogramme
/usr/local/lib/python3.6/dist-packages/statsmodels/tools/_testing.py:19: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
import pandas.util.testing as tm