I am trying to make plots with multiple sets of custom buttons and I keep updating the data with these buttons. Now the output from one set of buttons depends on the output of a different set. For example, I have a button that switches from A vs B to A vs C. Then I have a button for linear fit - but the linear fit will depend on whether it’s A vs B or A vs C. Is there a way to know which button is clicked from the code so that I can use that as an input for the second set of buttons? Or else, is there any other way to do this?
Basically I am looking for a way to find which button was clicked.