23👍
✅
Are you wanting something like this?
import matplotlib.pyplot as plt
from matplotlib.ticker import FormatStrFormatter
x = range(10)
plt.plot(x)
plt.gca().xaxis.set_major_formatter(FormatStrFormatter('%d km'))
plt.show()
Source:stackexchange.com