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

4 Ansichten (letzte 30 Tage)
Praharsh Chandra
Praharsh Chandra am 24 Apr. 2013
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!

Antworten (1)

Andrew Reibold
Andrew Reibold am 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.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by