How to mirror a plot ?

조회 수: 300 (최근 30일)
Ali nouri
Ali nouri 2020년 2월 24일
댓글: DGM 2022년 5월 8일
Hi
I need a help, i want to mirror a plotaround y axis, but still have the same axis, can anybody help?
I have upload the plot as attachments.
  댓글 수: 2
Ankit
Ankit 2020년 2월 24일
try this
plot(-x(:,1), y(:,2));
Ali nouri
Ali nouri 2020년 2월 24일
but then x axis is negativ.

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

채택된 답변

Ankit
Ankit 2020년 2월 24일
편집: Ankit 2020년 2월 24일
After your plot command, add the below line:
set(gca, 'XDir','reverse')
  댓글 수: 5
jose daniel hoyos giraldo
jose daniel hoyos giraldo 2022년 5월 7일
did you solve it?
DGM
DGM 2022년 5월 8일
?
x = -10:20;
y = x/10;
% the regular plot
plot(x,y,'k'); hold on
% the same series, but flipped on x
plot(-x,y,'b:')

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Parametric Spectral Estimation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by