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})

 채택된 답변

Adam Danz
Adam Danz 2020년 4월 13일
편집: Adam Danz 2020년 4월 13일

0 개 추천

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))

댓글 수: 2

SuzieChan
SuzieChan 2020년 4월 13일
편집: SuzieChan 2020년 4월 13일
figure
hold on
scatter(A{:,1}, A{:,2})
ax = scatter(B{:,1}, B{:,2})
ax = gca();
ax.XDir = 'reverse';
This code flips BOTH blue and orange parts (I think because they are connected to the same axis).
I think I must split the x-axis to reverse only the orange part, right?
Adam Danz
Adam Danz 2020년 4월 13일
Answer updated.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Develop Apps Programmatically에 대해 자세히 알아보기

태그

질문:

2020년 4월 13일

댓글:

2020년 4월 13일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by