text: from PyQt5 import QtWidgets
  from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
  from matplotlib.figure import Figure
  
  
  class MplCanvas(FigureCanvas):
      """Initializes a QT5 figure canvas for matplotlib plots.
  
      Attributes
      ----------
      fig: Figure
          The figure containing all the plots, subplots, axes, etc.
      """
  
      def __init__(self, parent=None, width=5, height=4, dpi=100):
          """Intializes the figure canvas and fig attribute.
  
          Parameters
          ----------
          parent: Object
              Parent of object class.
          width: float
              Width of figure in inches.
          height: float
              Height of figure in inches.
          dpi: float
              Screen resolution in dots per inch used to scale figure.
          """
  
          # Initialize figure
          self.fig = Figure(figsize=(width, height), dpi=dpi)
  
          # Configure FigureCanvas
          FigureCanvas.__init__(self, self.fig)
          self.setParent(parent)
  
          FigureCanvas.setSizePolicy(self,
                                     QtWidgets.QSizePolicy.Expanding,
                                     QtWidgets.QSizePolicy.Expanding)
          FigureCanvas.updateGeometry(self)
  