Delete previous xline on app.UIAxes
7 views (last 30 days)
Show older comments
How to delete previous xline on app.UIAxes? Let say if I want to change a new value, the previous lines are still on the app.UIAxes. I have tried
xline(app.UIAxes,rotorbar_LSB,'Color','green','LineStyle','--','LineWidth',1.5,'DisplayName','Broken Rotor Bar LSB');
hold (app.UIAxes,'off')
delete (xline(app.UIAxes,rotorbar_LSB,'Color','green','LineStyle','--','LineWidth',1.5,'DisplayName','Broken Rotor Bar LSB'))
but seems like it does not work. The previous xline is still there.
0 Comments
Answers (1)
Voss
on 14 Apr 2022
Store the line when it is created:
app.xline_handle = xline(...);
Later, delete the line:
delete(app.xline_handle);
app.xline_handle = [];
3 Comments
See Also
Categories
Find more on Creating, Deleting, and Querying Graphics Objects 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!