Skip to content
Advertisement

Annotate 3D scatter plot on pick event

I want to show annotations on a 3D scatter plot when the user clicks on a point.

The code I have shows the annotation once I move the plot after I click on a point.

JavaScript

How can I make the annotation appear as soon as the user clicks on a point, without having to move the plot?

Advertisement

Answer

Add fig.canvas.draw_idle() at the end of your callback function to force the re-drawing of the new annotation.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement