def _figure_format_changed(self, name, old, new): from IPython.core.pylabtools import select_figure_format if new in {"jpg", "jpeg"}: if not pil_available(): raise TraitError("Requires PIL/Pillow for JPG figures") if self.shell is None: return else: select_figure_format(self.shell, new)
def _figure_format_changed(self, name, old, new): from IPython.core.pylabtools import select_figure_format if self.shell is None: return else: select_figure_format(self.shell, new)
def _figure_format_changed(self, name, old, new): if self.shell is None: return else: select_figure_format(self.shell, new)
def disable_retina(ip): from matplotlib.figure import Figure from IPython.core.pylabtools import select_figure_format select_figure_format(ip, 'png') html_formatter = ip.display_formatter.formatters['text/html'] html_formatter.type_printers.pop(Figure, None)