how to emulate "hold on" in 2014b
1 view (last 30 days)
Show older comments
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.
0 Comments
Accepted Answer
Sean de Wolski
on 6 Jan 2015
Edited: Sean de Wolski
on 6 Jan 2015
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
More Answers (1)
Ajay Pherwani
on 6 Jan 2015
hold on and hold all are the same in R20104b Matlab 2014b help document suggests that they might remove hold all in future !!
0 Comments
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!