vals = np.random.rand(1000)
major_formatter = FuncFormatter(my_formatter)
plt.hist(vals, bins=100)
ax = plt.subplot(111)
ax.xaxis.set_major_formatter(major_formatter)
plt.show()
removing leading 0 from matplotlib tick label formatting