Toggle Curves in a GUI Plot on/off using check boxes

2 views (last 30 days)
Hi,
Had a small query.
I have a plot which has 3 curves plotted against time. I have three check boxes in my GUI. I want that only the curves corresponding to the ticked check boxes are shown.
Is there any simple way to do this?? (Thing is I have a broader problem to solve as I have 9 curves in sets of 3, so I was hoping to know if there is a short and simple way to do this)
Thanks!

Answers (1)

Andrew Reibold
Andrew Reibold on 6 Jun 2013
I am currently toggling on and off four lines, and unfortunately the only way so far that I have been able to do it is by using 'hold' when I'm adding a plot, and by clearing the plot and replotting the ones I want to keep when removing.
Total pain in the butt I know. Hopefully someone has a better way for you, but thats one way to do it.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!