[Matplotlib-users] selecting points inside plot

Jean-Philippe Grivet jean-philippe.grivet at wanadoo.fr
Tue Aug 29 10:21:29 EDT 2017


Hello,
I use Win7 and the Anaconde suite of Python programs.
I am trying to write a piece of software to demonstrate the computation
of electric potentials. The software should ;

     - allow a user to select (with a mouse click) a point inside a 
blank rectangle,
     - record the x and y coordinates of  that point
     - draw a dot at that location
     - ask the user for the value of the charge located there and record 
that
     - repeat a few times
     - compute the electric potential and draw a contour plot of that 
function.

There are several pieces of code available showing how to print the x,y 
coor-
dinates of a mouse click but I can't devise a way to retrieve thes 
values for
turther computations nor can I dra a dot at the corresponding location
or insert a dialog to get the charge values.

I would be grateful for any suggestion.
JP Grivet


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus



More information about the Matplotlib-users mailing list