How to fix this weird plot behaviour?
    5 次查看(过去 30 天)
  
       显示 更早的评论
    
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
0 个评论
采纳的回答
更多回答(1 个)
  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).
另请参阅
类别
				在 Help Center 和 File Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


