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)
| 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 | """ |
no test coverage detected