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 ...