how to emulate "hold on" in 2014b

2 views (last 30 days)
This is apparently a duplicate of: 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:
hold on
hold off
hold all
hold off
Prior to 2014b these plots would look different, now they look the same.

Accepted Answer

Sean de Wolski
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:
ax = gca;
ax.ColorOrder = ax.ColorOrder(1,:);
hold on
for ii = 1:10
  1 Comment
Jim Hokanson
Jim Hokanson on 6 Jan 2015
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.

Sign in to comment.

More Answers (1)

Ajay Pherwani
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 !!


Find more on Graphics Object Programming 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!

Translated by