I'm trying to find the best way for a user to interactively select a subset of data in a scatter plot that will then be polyfit and otherwise analyzed. I've been trying to use the brush tool, which allows the user to draw a box of the data of interest. It seems like much of the implementation is entirely interactive and handled by the matlab graphics under the hood. I would really like a way to pull the selected data out of the brush object.
I found these previous documents from 2012 and 2015 that claim to have solved the problem but the solution is not working for me:
The second article seems to suggest that the styles and data drawn on the graph by brushing are added as a new Child of the brushed axes. This doesn't appear to be the case anymore. Perhaps if I could find where this scatter plot style is stored, I could tap into the data. I understand that it is difficult to get a callback to return data to the user, so I guess I'll also need a way to detect when the data brushing is changed.
Best Answer