MATLAB Answers

How to control a plot with checkbox in app designer. So when checkbox is tick it may plot graph and when checkbox is unchecked it should remove graph in UIAxes.

23 views (last 30 days)
i m plotting a graph in app designer on UIAxes
a = [1 2 3] % added to property
b = [4 5 6] % added to property
in checkbox call back in write following code
Value = app.checkbox.Value
Value = plot(app.UIAxes,a,b)
now when i run the code and tick the checkbox it successfully plots the graph on UIAxes but when i uncheck it Graph doesnt disappear it remains plotted. kindy guide. Thanks

Accepted Answer

Ameer Hamza
Ameer Hamza on 6 Oct 2020
Check the attached app for the demo.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by