In this recipe, we will learn how to embed Matplotlib plots in a wxPython GUI application. We will use the same data and plot that we have been using in this chapter.
Embedding Matplotlib in to a wxPython GUI application
Getting ready
Import the required libraries:
import wx
import numpy as np
from matplotlib.figure import Figure
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg
How to do it...
The following are the steps needed to implement the logic:
- Define the wxPython...