In fact you just selected what you selected, and you’ll only get points within your selection if you try to retrieve the data inside the selection.
It’s just that when you select a region where a group of scatter points have 0 points, the color of those points won’t change, but they are not “selected”.
You can still safely use the
cb_obj.get(‘selected’)[‘1d’].indices
In fact you just selected what you selected, and you'll only get points within your selection if you try to retrieve the data inside the selection.
It's just that when you select a region where a group of scatter points have 0 points, the color of those points won't change, but they are not "selected".
You can still safely use the
cb_obj.get('selected')['1d'].indices
in a callback to get your selected data.