Run the exporter on the given figure Parmeters --------- fig : matplotlib.Figure instance The figure to export
(self, fig)
| 34 | self.renderer = renderer |
| 35 | |
| 36 | def run(self, fig): |
| 37 | """ |
| 38 | Run the exporter on the given figure |
| 39 | |
| 40 | Parmeters |
| 41 | --------- |
| 42 | fig : matplotlib.Figure instance |
| 43 | The figure to export |
| 44 | """ |
| 45 | # Calling savefig executes the draw() command, putting elements |
| 46 | # in the correct place. |
| 47 | if fig.canvas is None: |
| 48 | FigureCanvasAgg(fig) |
| 49 | fig.savefig(io.BytesIO(), format="png", dpi=fig.dpi) |
| 50 | if self.close_mpl: |
| 51 | import matplotlib.pyplot as plt |
| 52 | |
| 53 | plt.close(fig) |
| 54 | self.crawl_fig(fig) |
| 55 | |
| 56 | @staticmethod |
| 57 | def process_transform( |