04-14-2020 07:15 AM
Hi
I am reading a .csv file to create a multiple XY plot (multiple Y for X-axis). First column (in excel terminology the column A) contains name of y series (plot legends). Rest of the columns (e.g., column B onward) contain data that to be plotted against X axis.
I would like to have a way where user can select which y values will be plotted. For example front panel can have Boolean buttons for each y value and user can select multiple Boolean buttons. The XY plot will only plot the data for selected Y values. Is it possible to create front panel with Boolean buttons named programmatically using the values in first column?
Thank you.
04-14-2020 07:19 AM
Just r-click the Ploty legend and select Show visibility. Setting the plot names and changing how many rows to show is easy programmatically.
04-14-2020 07:25 AM
04-14-2020 07:39 AM
Both the suggested ways are good options. However, I have two issues: (1) with around 100 rows, scrolling through that many plot legends for selecting /deselecting is not efficient/user friendly (2) I also need option where i can (a) deselect all (b) select/deselect certain rows of visibility checkbox with a click . Is it possible using property node(s)?
04-14-2020 09:10 AM
@Jpdas06 wrote:
Both the suggested ways are good options. However, I have two issues: (1) with around 100 rows, scrolling through that many plot legends for selecting /deselecting is not efficient/user friendly (2) I also need option where i can (a) deselect all (b) select/deselect certain rows of visibility checkbox with a click . Is it possible using property node(s)?
1. Yes, showing the Legend and clicking up to 100 rows will not work any good.
2. Then you must use a Listbox (with symbols). I'd create a r-click menu so you can select between [Unmark all, Mark all, Mark selected, Unmark selected] Maybe 'Add to' and 'Remove from' selection also. Since the Listbox array gives an array of selected rows it should be very easy to just scroll through that list and add a Tick as symbol. Changing the visibility must be done through property nodes as posted earlier.