How to fix this weird plot behaviour?

조회 수: 8 (최근 30일)
Adrian Brand
Adrian Brand 2020년 4월 3일
답변: Adrian Brand 2020년 4월 3일
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

채택된 답변

Adrian Brand
Adrian Brand 2020년 4월 3일
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.

추가 답변 (1개)

David Goodmanson
David Goodmanson 2020년 4월 3일
편집: David Goodmanson 2020년 4월 3일
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
Adrian Brand
Adrian Brand 2020년 4월 3일
Thank you for the tip about hold on. But sadly it still doesn't work as you can see.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by