I have pretty long plot tick labels which unfortunately I cannot shorten. I am thus looking for a code to split the label into multiple lines (wrap text). I tried text wrap but it caused an error in my code.
Having the tick label at rotation=0
makes the tick label overlap each other and becomes un-readable.
I also tried having a rotation=90
but the tick label instead spills into my chart space.
plt.title(param)
plt.ylabel('Measurement')
plt.xticks(x_axis, labels, rotation = 10, fontsize=8, horizontalalignment="center")
plt.tick_params(axis='x', pad=6)
lgd = ax.legend(loc = 'upper left', bbox_to_anchor=(1,1))