필터 지우기
필터 지우기

how to emulate "hold on" in 2014b

조회 수: 1 (최근 30일)
Jim Hokanson
Jim Hokanson 2015년 1월 6일
편집: Jim Hokanson 2015년 1월 6일
Edit:
This is apparently a duplicate of: http://www.mathworks.com/matlabcentral/answers/165787-how-can-i-get-the-pre-2014b-behavior-of-hold-on I'd recommended continuing any discussion of this question there
I noticed that hold on and hold all are now the same in 2014b and behave the same as the old "hold all" syntax used to. Is there an easy way of accomplishing the old "hold on" syntax in 2014b? Any thoughts as to why this was changed?
Test code:
subplot(2,1,1)
plot(1:10)
hold on
plot(20:30)
hold off
subplot(2,1,2)
plot(1:10)
hold all
plot(20:30)
hold off
Prior to 2014b these plots would look different, now they look the same.

채택된 답변

Sean de Wolski
Sean de Wolski 2015년 1월 6일
편집: Sean de Wolski 2015년 1월 6일
Or you can set the axes' ColorOrder property to be all the same:
plot(1:10)
ax = gca;
ax.ColorOrder = ax.ColorOrder(1,:);
hold on
for ii = 1:10
plot(rand(1,10));
end
  댓글 수: 1
Jim Hokanson
Jim Hokanson 2015년 1월 6일
Oops. I try and search for my questions before asking them but apparently I missed it this time. Thanks.
I'm not sure that either page gives the best answer in terms of functionality but I think continuing the discussion on the other page is probably better.

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

추가 답변 (1개)

Ajay Pherwani
Ajay Pherwani 2015년 1월 6일
hold on and hold all are the same in R20104b Matlab 2014b help document suggests that they might remove hold all in future !!

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by