How to fix this weird plot behaviour?

Hello. I have problem with dissapearin function using plot. It looks like this:
However if I change position of the view it disapears:
It is the case of only that function. Does somebody know, why?
figure(1)
hold on
ylim([678, 685])
plot(vysledkyM, 'r');
plot(vysledkyU, 'b');
plot(vysledkyS, 'g');
legend('death penalty','stupnova', 'umerna')
hold off
EDIT: Clarification of the question

 Respuesta aceptada

Adrian Brand
Adrian Brand el 3 de Abr. de 2020
figure(1)
hold all;
ylim([678, 685]);
plot(vysledkyM, 'r');
plot(vysledkyU, 'b');
plot(vysledkyS, 'g');
legend('death penalty','stupnova', 'umerna');
hold off;
This did the trick.

Más respuestas (1)

David Goodmanson
David Goodmanson el 3 de Abr. de 2020
Editada: David Goodmanson el 3 de Abr. de 2020
Hi Adrian,
figure(1)
plot(vysledkyM, 'r');
ylim([678, 685])
hold on
plot(vysledkyU, 'b');
plot(vysledkyS, 'g');
legend('death penalty','stupnova', 'umerna')
hold off
Matlab only buys into 'hold on' after the first trace is plotted. (Same with ylim, evidentty).

1 comentario

Adrian Brand
Adrian Brand el 3 de Abr. de 2020
Thank you for the tip about hold on. But sadly it still doesn't work as you can see.

Iniciar sesión para comentar.

Categorías

Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.

Productos

Versión

R2019b

Etiquetas

Preguntada:

el 3 de Abr. de 2020

Respondida:

el 3 de Abr. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by