plt.plot(list(range(10)))
labels = [(10 * repr(i)) for i in range(10)]
plt.xticks(list(range(10)), labels, rotation=-30, ha='left')
plt.tight_layout()
plt.show()
How do I autosize text in matplotlib python?