histogram plot by range python code example
Example 1: python matplotlib hist set axis range
# Basic syntax:
plt.ylim(min,max)
plt.xlim(min,max)
# Example usage:
import matplotlib.pyplot as plt
plt.plot(range(5))
plt.xlim(-5, 5)
plt.ylim(-5, 5)
# Note, this approach is more versatile than using range=[min,max] which
# only works in some plots, e.g. plt.hist(range(5), range=[-5,5])
Example 2: 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