Black Lives Matter. Please consider donating to Campaign Zero's mission of ending police violence in America.

How can I change the color of selected points in scatterplots?

In Jupyter Notebook I’d like to change the color of selected points/markers with FigureWidget on_selection() events (similar to on_click event). E.g. the bubble-scatter-plot example shows how to assign colors to all scatterplot markers via scatter marker color. But how can I change the color of a specific subset of markers of selected points in the corresponding callback function?

@fkromer This notebook was posted one year ago. I hope it is what you are looking for.

@empet That’s almost what I’m looking for. In my case I have only blue markers which are very dense. Therefor I’d like to change the selected one to another color with a high contrast to blue, e.g. red. I’m that far right now that the color changes from blue to yellow…