How to mirror a plot ?

195 次查看(过去 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 个评论
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