import matplotlib.pylab as plt
%matplotlib inline
def plot_data_distribution(value_list, figsize=(21, 12), bins=50, fout=None):
plt.figure(figsize=figsize)
plt.hist(value_list, bins=bins)
plt.xticks(range(int(max(value_list) - min(value_list))))
# plt.xticks([i * 0.01 for i in range(0, 110, 5)])
# plt.xticks([0.1 * x for x in range(11)])
# plt.xlim(0, 1)
plt.grid()
if fout:
plt.savefig(fout)
else:
plt.show()
plot_data_distribution([0.1,0.1,0.1],fout='./xxx.png')