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 Center および File ExchangeSpecifying 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