コード例 #1
0
ファイル: backend_inline.py プロジェクト: shimizukawa/ipython
def send_svg_figure(fig):
    """Draw the current figure and send it as an SVG payload.
    """
    # For an empty figure, don't even bother calling figure_to_svg, to avoid
    # big blank spaces in the qt console
    if not fig.axes:
        return

    svg = figure_to_svg(fig)
    # flush text streams before sending figures, helps a little with output
    # synchronization in the console (though it's a bandaid, not a real sln)
    sys.stdout.flush()
    sys.stderr.flush()
    publish_display_data('IPython.zmq.pylab.backend_inline.send_svg_figure',
                         'Matplotlib Plot', {'image/svg+xml': svg})
コード例 #2
0
ファイル: backend_inline.py プロジェクト: addisonc/ipython
def send_svg_figure(fig):
    """Draw the current figure and send it as an SVG payload.
    """
    # For an empty figure, don't even bother calling figure_to_svg, to avoid
    # big blank spaces in the qt console
    if not fig.axes:
        return

    svg = figure_to_svg(fig)
    # flush text streams before sending figures, helps a little with output
    # synchronization in the console (though it's a bandaid, not a real sln)
    sys.stdout.flush(); sys.stderr.flush()
    publish_display_data(
        'IPython.zmq.pylab.backend_inline.send_svg_figure',
        'Matplotlib Plot',
        {'image/svg+xml' : svg}
    )
コード例 #3
0
ファイル: backend_inline.py プロジェクト: brickZA/ipython
def send_svg_figure(fig):
    """Draw the current figure and send it as an SVG payload.
    """
    svg = figure_to_svg(fig)
    publish_display_data("IPython.zmq.pylab.backend_inline.send_svg_figure", "Matplotlib Plot", {"image/svg+xml": svg})
コード例 #4
0
def send_svg_figure(fig):
    """Draw the current figure and send it as an SVG payload.
    """
    svg = figure_to_svg(fig)
    publish_display_data('IPython.zmq.pylab.backend_inline.send_svg_figure',
                         'Matplotlib Plot', {'image/svg+xml': svg})