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

3 次查看(过去 30 天)
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!

回答(1 个)

Andrew Reibold
Andrew Reibold 2013-6-6
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.

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by