environment/lib/python2.7/site-packages/IPython/core/pylabtools.py
def select_figure_format(shell, fmt):
    """Select figure format for inline backend, either 'png' or 'svg'.

    Using this method ensures only one figure format is active at a time.
    """
    from matplotlib.figure import Figure
    from IPython.zmq.pylab import backend_inline

    svg_formatter = shell.display_formatter.formatters['image/svg+xml']
    png_formatter = shell.display_formatter.formatters['image/png']

    if fmt=='png':
        svg_formatter.type_printers.pop(Figure, None)
        png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png'))
    elif fmt=='svg':
        png_formatter.type_printers.pop(Figure, None)
        svg_formatter.for_type(Figure, lambda fig: print_figure(fig, 'svg'))
    else:
        raise ValueError("supported formats are: 'png', 'svg', not %r"%fmt)

    # set the format to be used in the backend()
    backend_inline._figure_format = fmt
def select_figure_format(shell, fmt):
    from matplotlib.figure import Figure
    from IPython.zmq.pylab import backend_inline

    svg_formatter = shell.display_formatter.formatters['image/svg+xml']
    png_formatter = shell.display_formatter.formatters['image/png']

    if fmt=='png':
        svg_formatter.type_printers.pop(Figure, None)
        png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png'))
    elif fmt=='svg':
        png_formatter.type_printers.pop(Figure, None)
        svg_formatter.for_type(Figure, lambda fig: print_figure(fig, 'svg'))
    else:
        raise ValueError("supported formats are: 'png', 'svg', not %r"%fmt)

    # set the format to be used in the backend()
    backend_inline._figure_format = fmt
def select_figure_format ( shell , fmt ) : from matplotlib . figure import Figure from IPython . zmq . pylab import backend_inline svg_formatter = shell . display_formatter . formatters [ 'image/svg+xml' ] png_formatter = shell . display_formatter . formatters [ 'image/png' ] if fmt == 'png' : svg_formatter . type_printers . pop ( Figure , None ) png_formatter . for_type ( Figure , lambda fig : print_figure ( fig , 'png' ) ) elif fmt == 'svg' : png_formatter . type_printers . pop ( Figure , None ) svg_formatter . for_type ( Figure , lambda fig : print_figure ( fig , 'svg' ) ) else : raise ValueError ( "supported formats are: 'png', 'svg', not %r" % fmt ) # set the format to be used in the backend() backend_inline . _figure_format = fmt
Select figure format for inline backend, either 'png' or 'svg'.

    Using this method ensures only one figure format is active at a time.
Select figure format for inline backend either png or svg .