MATLAB: Warning message: Erase mode property no longer supported!!

errorode45

Hello,
I get the following warning message:
Warning: The EraseMode property is no longer supported and will error in a future release.
The corresponding code lines are :
KeSTART = 0;
KeSTEP = 0.025;
KeSTOP = 2;
AXDEF = [KeSTART KeSTOP 0 1];
colordef white;
f1 = figure;
p = plot(AXDEF(1)-1,AXDEF(3)-1,'k.');
drawnow;
set(p,'Erasemode','none','MarkerSize',1);
axis(AXDEF);
grid off;
hold on;
It is stated that it can be replaced by animatedline, but I don't know how to replace it in the line of code.
Could you help with modifying the above code?

Best Answer

Simply omit the 'Erasemode','none' in your code and do not delete the created line afterwards.