Interference tkinter and plot from matplotlib

Pierre Bonville pierre.bonville49 at gmail.com
Thu Oct 1 03:05:17 EDT 2020


Thank you, Mr. Gollwitzer. I understand the problem. I'll see what I can do.
Regards,
P.Bonville


Le mer. 30 sept. 2020 à 17:02, Christian Gollwitzer <auriocus at gmx.de> a
écrit :

> Am 30.09.20 um 15:46 schrieb Pierre Bonville:
> >   Hi everybody,
>
> > Interference tkinter and plot from matplotlib
>
>
> You are mixing different ways of control flow. In a GUI program, don't
> call input(). Use the mainloop() as the very last of your calls, and
> only work in the callbacks. That means you would integrate a "Next"
> button in your GUI which switches the plots - or even show them side by
> side.
>
> Concerning matplotlib, you'll need to tell it to integrate with Tk
> properly.
>
> https://matplotlib.org/3.3.1/gallery/user_interfaces/embedding_in_tk_sgskip.html
>
>
> If you want a simple solution instead of full-blown GUI programming, use
> IPython https://ipython.readthedocs.io/en/stable/config/eventloops.html
> or jupyter notebooks.
>
>
>         Christian
> --
> https://mail.python.org/mailman/listinfo/python-list
>


More information about the Python-list mailing list