How to mirror a plot ?

301 visualizaciones (últimos 30 días)
Ali nouri
Ali nouri el 24 de Feb. de 2020
Comentada: DGM el 8 de Mayo de 2022
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 comentarios
Ankit
Ankit el 24 de Feb. de 2020
try this
plot(-x(:,1), y(:,2));
Ali nouri
Ali nouri el 24 de Feb. de 2020
but then x axis is negativ.

Iniciar sesión para comentar.

Respuesta aceptada

Ankit
Ankit el 24 de Feb. de 2020
Editada: Ankit el 24 de Feb. de 2020
After your plot command, add the below line:
set(gca, 'XDir','reverse')
  5 comentarios
jose daniel hoyos giraldo
jose daniel hoyos giraldo el 7 de Mayo de 2022
did you solve it?
DGM
DGM el 8 de Mayo de 2022
?
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:')

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Parametric Spectral Estimation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by