[Matplotlib-users] selecting points inside plot
tcaswell at gmail.com
Tue Aug 29 22:13:59 EDT 2017
What you want to do is totally possible!
I suggest having a look at the examples in
https://matplotlib.org/examples/widgets/index.html the `ginput` method,
https://github.com/tacaswell/interactive_mpl_tutorial and Ben Root's book
On Tue, Aug 29, 2017 at 10:29 AM Jean-Philippe Grivet <
jean-philippe.grivet at wanadoo.fr> wrote:
> 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
> - repeat a few times
> - compute the electric potential and draw a contour plot of that
> There are several pieces of code available showing how to print the x,y
> 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.
> Matplotlib-users mailing list
> Matplotlib-users at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Matplotlib-users