plt.xticks(fontsize=)
import matplotlib.pyplot as plt
# We prepare the plot
fig, ax = plt.subplots()
# We change the fontsize of minor ticks label
ax.tick_params(axis='both', which='major', labelsize=10)
ax.tick_params(axis='both', which='minor', labelsize=8)
ax.set_xticklabels(labels)
import matplotlib.pyplot as plt
x = range(6)
y = [-3, -2, -1, 1, 2, 3]
xlabels = [f'label {i}' for i in x]
fig, ax = plt.subplots()
ax.bar(x, y)
# ha='***' is not enough to visually align labels with ticks
# use both ha='***' and rotation_mode='anchor'
ax.set_xticks(x, xlabels, rotation=45, ha='right', rotation_mode='anchor')
plt.show()