Plot through bottom y-limit
Mostrar comentarios más antiguos
How can I let a plot go through the bottm y-lim and connect to the next point at the oppisite (max) y-lim?
I have a x y matrix which y sapns from -180 to 180. Yet most of the data fluctuate around -180 and should then come back from the top of the plot rather than being connected going through 0.
Thanks.
Respuesta aceptada
Más respuestas (1)
Steven Lord
el 6 de Ag. de 2019
If you want to make a "break" in your plot, include NaN in the X and/or Y vectors.
x = 0:0.25:10;
y = x.^2;
subplot(2, 1, 1)
plot(x, y)
title('No NaN values')
subplot(2, 1, 2)
y2 = y;
y2(mod(x, 1) == 0) = NaN;
plot(x, y2);
title('NaN values in y data for integer values of x')
Categorías
Más información sobre Annotations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
