ax.set_xticklabels(('A1', '\n\nGeneral Info', 'A2', 'B1', '\n\nTechnical',
    'B2', 'C1', '\n\nPsycological', 'C2'), ha='center')
ax.tick_params(axis='x', which='both', length=0)
for label in ax.get_xmajorticklabels():
    if 'A' in label.get_text():
        label.set_rotation(45)
plt.show()
How to add the second line of labels in matplotlib plot