[Python] Is there a way to tell where a user has clicked a 3D surface plot in matplotlib?

Discussão em 'Python' iniciado por Stack, Janeiro 31, 2025.

  1. Stack

    Stack Membro Participativo

    I am creating a 3D plot using Matplotlib. The plot contains points, lines and surfaces displayed in 3D space. Using the “picker=true” option for the lines and points I can make them clickable. And when the user clicks on them I can return the location of their pointer in 3D space using “get_data_3d”. I can’t get this to work with the 3d surfaces though. They are poly3dcollections instead of line3d. They don’t have a “get_data_3d” function. Any idea how I can return where the user clicks on a 3d surface?

    Continue reading...

Compartilhe esta Página