MATLAB: How to rotate graph

graph

Hi!
What code can I use to flip the orange portion of this graph in the vertical plane, 180 degrees?
>> figure
hold on
scatter(A{:,1}, A{:,2})
% Flip the next line in the veritcal plane
scatter(B{:,1}, B{:,2})

Best Answer

ax = gca();
ax.XDir = 'reverse';
% or

ax.YDir = 'reverse';
To flip the data vertically rather than the axes,
scatter(x, fliplr(y))
% or
scatter(x, flipud(y))