O'Reilly logo

Interactive Applications Using Matplotlib by Benjamin V. Root

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Matplotlib in your app

We have peered behind the canvas and have gained an immense understanding of how backends in Matplotlib operate. For four of the major backends, we have even seen how to augment our application with GUI widgets, learning some of the subtle differences in the backends.

But, what if you already have a GUI application written in Python, and the Matplotlib portion is the new feature to add? This is called embedding. The basic idea is that the canvas is added to your application as a widget. The tricky part is that you cannot let pyplot create the Figure instance. The pyplot module assumes that it will be responsible for triggering and terminating the application mainloop. It also automatically attaches the figure managers to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required