for ax in [ax1,ax2,ax3]: for label in ax.get_xticklabels(): label.set_rotation(90)
Here is what the above code is Doing:
1. We’re creating a figure with 3 subplots.
2. We’re creating a list of the 3 subplots.
3. We’re creating a list of the 3 axes.
4. We’re iterating through the 3 axes and setting the x-axis labels to rotate 90 degrees.