How to fix this weird plot behaviour?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Adrian Brand
il 3 Apr 2020
Risposto: Adrian Brand
il 3 Apr 2020
Hello. I have problem with dissapearin function using plot. It looks like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/281651/image.png)
However if I change position of the view it disapears:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/281652/image.png)
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
0 Commenti
Risposta accettata
Più risposte (1)
David Goodmanson
il 3 Apr 2020
Modificato: David Goodmanson
il 3 Apr 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).
Vedere anche
Categorie
Scopri di più su Graphics Performance in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!