'Enter "raster" mode.  All subsequent drawing commands (until
stop_rasterizing is called) will be drawn with the raster
backend.
If start_rasterizing is called multiple times before
stop_rasterizing is called, this method has no effect.'

def start_rasterizing(self):

    self.figure.set_dpi(self.dpi)
    if self._bbox_inches_restore:
        r = process_figure_for_rasterizing(self.figure, self._bbox_inches_restore)
        self._bbox_inches_restore = r
    if (self._rasterizing == 0):
        self._raster_renderer = self._raster_renderer_class((self._width * self.dpi), (self._height * self.dpi), self.dpi)
        self._set_current_renderer(self._raster_renderer)
    self._rasterizing += 1
