import matplotlib.pyplot as plt import numpy as np fig, ax = plt.subplots(1, 2, layout='constrained', figsize=(6, 2)) ax[0].set_title('Ticks seem out of order / misplaced') x = ['5', '20', '1', '9'] # strings y = [5, 20, 1, 9] ax[0].plot(x, y, 'd') ax[0].tick_params(axis='x', labelcolor='red', labelsize=14) ax[1].set_title('Many ticks') x = [str(xx) for xx in np.arange(100)] # strings y = np.arange(100) ax[1].plot(x, y) ax[1].tick_params(axis='x', labelcolor='red', labelsize=14)