MATLAB: Reverse the y axis

reverse y axisstep function plot

I have a step function plot in matlab. I want to reverse the y axis so that the initial value is at the top and also the x axis start from that point only.

Best Answer

set(gca, 'YDir', 'reverse')