How to mirror a plot ?

306 ビュー (過去 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 Center および File ExchangeParametric Spectral Estimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by