9951 explained code solutions for 126 technologies

python-matplotlibHow to customize histogram bins

import matplotlib.pyplot as plt

x = [1,2,5,1,2,3,5,6,7,4,2,2,4,5,6]
plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities


plots histogram for specified data


we can specify list of values to build bins based on


sets histogram bar border color


render chart in a separate window