How to fix this weird plot behaviour?

9 Ansichten (letzte 30 Tage)
Adrian Brand
Adrian Brand am 3 Apr. 2020
Beantwortet: Adrian Brand am 3 Apr. 2020
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

Akzeptierte Antwort

Adrian Brand
Adrian Brand am 3 Apr. 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.

Weitere Antworten (1)

David Goodmanson
David Goodmanson am 3 Apr. 2020
Bearbeitet: David Goodmanson am 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).
  1 Kommentar
Adrian Brand
Adrian Brand am 3 Apr. 2020
Thank you for the tip about hold on. But sadly it still doesn't work as you can see.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Specifying Target for Graphics Output finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by