matplotlib.backends.backend_mixed
¶matplotlib.backends.backend_mixed.
MixedModeRenderer
(figure, width, height, dpi, vector_renderer, raster_renderer_class=None, bbox_inches_restore=None)¶Bases: object
A helper class to implement a renderer that switches between vector and raster drawing. An example may be a PDF writer, where most things are drawn with PDF vector commands, but some very complex objects, such as quad meshes, are rasterised and then output as images.
Parameters: | figure :
width : scalar
height : scalar
dpi : scalar
vector_renderer :
raster_renderer_class :
|
---|
start_rasterizing
()¶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.
stop_rasterizing
()¶Exit “raster” mode. All of the drawing that was done since the last start_rasterizing command will be copied to the vector backend by calling draw_image.
If stop_rasterizing is called multiple times before start_rasterizing is called, this method has no effect.