MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _print_pil

Method _print_pil

lib/matplotlib/backends/backend_agg.py:480–488  ·  view source on GitHub ↗

Draw the canvas, then save it using `.image.imsave` (to which *pil_kwargs* and *metadata* are forwarded).

(self, filename_or_obj, fmt, pil_kwargs, metadata=None)

Source from the content-addressed store, hash-verified

478 print_rgba = print_raw
479
480 def _print_pil(self, filename_or_obj, fmt, pil_kwargs, metadata=None):
481 """
482 Draw the canvas, then save it using `.image.imsave` (to which
483 *pil_kwargs* and *metadata* are forwarded).
484 """
485 FigureCanvasAgg.draw(self)
486 mpl.image.imsave(
487 filename_or_obj, self.buffer_rgba(), format=fmt, origin="upper",
488 dpi=self.figure.dpi, metadata=metadata, pil_kwargs=pil_kwargs)
489
490 def print_png(self, filename_or_obj, *, metadata=None, pil_kwargs=None):
491 """

Callers 6

print_pngMethod · 0.95
print_gifMethod · 0.95
print_jpgMethod · 0.95
print_tifMethod · 0.95
print_webpMethod · 0.95
print_avifMethod · 0.95

Calls 2

buffer_rgbaMethod · 0.95
drawMethod · 0.45

Tested by

no test coverage detected