def show(fig, width=600):
    """ Renders a Matplotlib figure in Zeppelin.

    :param fig: a Matplotlib figure
    :param width: the width in pixel of the rendered figure, defaults to 600

    Usage example::

        import matplotlib.pyplot as plt
        from moztelemetry.zeppelin import show

        fig = plt.figure()
        plt.plot([1, 2, 3])
        show(fig)
    """
    img = StringIO()
    fig.savefig(img, format='svg')
    img.seek(0)
    print("%html <div style='width:{}px'>{}</div>".format(width, img.buf))
Renders a Matplotlib figure in Zeppelin.

    :param fig: a Matplotlib figure
    :param width: the width in pixel of the rendered figure, defaults to 600

    Usage example::

        import matplotlib.pyplot as plt
        from moztelemetry.zeppelin import show

        fig = plt.figure()
        plt.plot([1, 2, 3])
        show(fig)