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

4 ビュー (過去 30 日間)
Praharsh Chandra
Praharsh Chandra 2013 年 4 月 24 日
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 Center および File Exchange2-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