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

1 visualización (últimos 30 días)
Praharsh Chandra
Praharsh Chandra el 24 de Abr. de 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!

Respuestas (1)

Andrew Reibold
Andrew Reibold el 6 de Jun. de 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.

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by