def display(fig=None, closefig=True, **kwargs):
    from IPython.display import HTML
    if fig is None:
        fig = plt.gcf()
    if closefig:
        plt.close(fig)

    html = fig_to_html(fig, **kwargs)

    # We embed everything in an iframe.
    iframe_html = '<iframe src="data:text/html;base64,{html}" width="{width}" height="{height}"></iframe>'\
    .format(html = base64.b64encode(html.encode('utf8')).decode('utf8'),
            width = '100%',
            height= int(60.*fig.get_figheight()),
           )
    return HTML(iframe_html)
Decorator to wrap a function with a memoizing callable that saves
dataset/ETHPy150Open jwass/mplleaflet/mplleaflet/_display.py/display--crossover with--dataset/ETHPy150Open PressLabs/gitfs/gitfs/cache/decorators/lru.py/lru_wrapper