We are going to see how to embed a Matplotlib
Figure into a simple Qt window. We will first walk through the code and describe it, while presenting it as a whole at the end of the section (this presentation style will be used throughout the chapter).
Here is the beginning:
sys contains information and functions used to interact with the Python interpreter. In this case, we need it to access the command-line arguments passed to the Python script.
from PyQt4 import QtGui
We import the PyQt4 submodule,
QtGui which contains the biggest part of the GUI classes, for example, all the basic GUI widgets are located in this module.
import numpy as np
The NumPy module is needed for our example ...