def enable_mpl_offline(resize=False, strip_style=False, verbose=False, show_link=True, link_text='Export to plot.ly', validate=True):
 init_notebook_mode()
 ip = ipython.core.getipython.get_ipython()
 formatter = ip.display_formatter.formatters['text/html']
 formatter.for_type(matplotlib.figure.Figure, (lambda fig: iplot_mpl(fig, resize, strip_style, verbose, show_link, link_text, validate)))

def enable_mpl_offline ( resize = False , strip_style = False , verbose = False , show_link = True , link_text = 'Export to plot.ly' , validate = True ) : init_notebook_mode ( ) ip = ipython . core . getipython . get_ipython ( ) formatter = ip . display_formatter . formatters [ 'text/html' ] formatter . for_type ( matplotlib . figure . Figure , ( lambda fig : iplot_mpl ( fig , resize , strip_style , verbose , show_link , link_text , validate ) ) )
convert mpl plots to locally hosted html documents .