title: How do you display a figure in matplotlib using PySide2?
body: <p>I am trying to learn matplotlib and I tried testing the following code.</p>
  
  <pre><code>import matplotlib
  from matplotlib.figure import Figure  
  import matplotlib
  from matplotlib.figure import Figure
  from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as     FigureCanvas
  import sys
  from PySide2 import QtGui   
  
  if __name__ == "__main__":
  
      app = QtGui.QApplication(sys.argv)
      wid = QtGui.QWidget()
      wid.resize(250, 150)
      grid = QtGui.QGridLayout()
      wid.setLayout(grid)
      fig = Figure(figsize=(7,5), dpi=65, facecolor=(1,1,1), edgecolor=(0,0,0))
      canvas = FigureCanvas(fig)
      grid.addWidget(canvas)
      wid.show()
  </code></pre>
  
  <p>However it seems like it doesn't recognize the signature of Figure.</p>
  
  <blockquote>
    <p>TypeError: 'PySide2.QtGui.QGridLayout.addWidget' called with wrong
    argument types:<br>
    PySide2.QtGui.QGridLayout.addWidget(FigureCanvasQTAgg) Supported
    signatures:<br>
    PySide2.QtGui.QGridLayout.addWidget(PySide2.QtGui.QWidget, int, int,
    PySide2.QtCore.Qt.Alignment = 0)<br>
    PySide2.QtGui.QGridLayout.addWidget(PySide2.QtGui.QWidget, int, int,
    int, int, PySide2.QtCore.Qt.Alignment = 0)</p>
  </blockquote>