MATLAB: Plot: vertical legend for x axis

MATLABplot

I have the horizontal legend for x-axis as you see in the attached graphics. But in this way numbers are hard to see. I would like to set the legend to be vertical to improve readability. Please advise.

Best Answer

See if you can use the 'XTickLabelRotation' (link) ‘axes’ property. (I do not remember when this option first appeared. I believe it was R2015b.)