def __init__(self, parent, grid, bounding_box=None, vmin=None, vmax=None, codim=2, dpi=100):
    assert (grid.reference_element in (triangle, square))
    assert (grid.dim == 2)
    assert (codim in (0, 2))
    self.figure = Figure(dpi=dpi)
    super().__init__(self.figure)
    self.setParent(parent)
    self.setMinimumSize(300, 300)
    self.setSizePolicy(QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding))
    self.patch_axes = MatplotlibPatchAxes(figure=self.figure, grid=grid, bounding_box=bounding_box, vmin=vmin, vmax=vmax, codim=codim)
def __init__(self, parent, grid, bounding_box=None, vmin=None, vmax=None, codim=2, dpi=100):
    assert (grid.reference_element in (triangle, square))
    assert (grid.dim == 2)
    assert (codim in (0, 2))
    self.figure = Figure(dpi=dpi)
    super().__init__(self.figure)
    self.setParent(parent)
    self.setMinimumSize(300, 300)
    self.setSizePolicy(QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding))
    self.patch_axes = MatplotlibPatchAxes(figure=self.figure, grid=grid, bounding_box=bounding_box, vmin=vmin, vmax=vmax, codim=codim)