Flipping a plot in Matlab



I want to flip/rotate the plot in the attachment, such that the right part of the plot is rotated to the left and vice versa.
I have used flip command but doesn’t seem to work. I have also used camroll(-90), view() and set(gca,‘YDir’,‘reverse’) to achieve my desired result, but that hasn’t worked for me


it seems like you need set(gca, 'Xdir', 'reverse')