Creat List on a Plot to select multiple data sets

2 ビュー (過去 30 日間)
Kyle Reagan
Kyle Reagan 2017 年 5 月 31 日
コメント済み: Walter Roberson 2017 年 6 月 1 日
I want to make a graph with up to 10 data sets plotted on it. My idea is to have the figure with a list where the user can select multiple entries to plot by holding control and clicking what they want to see on the graph. I believe this can be done with an uicontrol... anyone know how?
  1 件のコメント
Kyle Reagan
Kyle Reagan 2017 年 5 月 31 日
Note: The data sets will each be line graphs.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2017 年 5 月 31 日
There are multiple ways of handling this. One is to provide toggle buttons to select the active graphs. Another is to provide a uitable column that the user toggles on or off the entries of. A third way is to provide a uicontrol('style','list', 'Max', 2) : with the Max parameter set to something larger than 1, the user is permitted to select multiple entries.
  2 件のコメント
Kyle Reagan
Kyle Reagan 2017 年 6 月 1 日
How do you let the user toggle whether the entries in a table are on or off? Or if it's easier, how would you set up toggle buttons so that more than one answer can be chosen? When I use toggle buttons, it will only let me select one button at a time.
Walter Roberson
Walter Roberson 2017 年 6 月 1 日
For uitable, set the ColumnFormat to 'logical'
For toggle buttons, just create a bunch of them, and do not put them inside a uibuttongroup.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by