@utils.template_doc(**get_config_file())
def mpl_to_plotly(fig, resize=False, strip_style=False, verbose=False):
 if matplotlylib:
  renderer = matplotlylib.PlotlyRenderer()
  matplotlylib.Exporter(renderer).run(fig)
  if resize:
   renderer.resize()
  if strip_style:
   renderer.strip_style()
  if verbose:
   print renderer.msg
  return renderer.plotly_fig
 else:
  warnings.warn("To use Plotly's matplotlylib functionality, you'll need to have matplotlib successfully installed with all of its dependencies. You're getting this error because matplotlib or one of its dependencies doesn't seem to be installed correctly.")

@ utils . template_doc ( ** get_config_file ( ) ) def mpl_to_plotly ( fig , resize = False , strip_style = False , verbose = False ) : if matplotlylib : renderer = matplotlylib . PlotlyRenderer ( ) matplotlylib . Exporter ( renderer ) . run ( fig ) if resize : renderer . resize ( ) if strip_style : renderer . strip_style ( ) if verbose : print renderer . msg return renderer . plotly_fig else : warnings . warn ( "To use Plotly's matplotlylib functionality, you'll need to have matplotlib successfully installed with all of its dependencies. You're getting this error because matplotlib or one of its dependencies doesn't seem to be installed correctly." )
convert a matplotlib figure to plotly dictionary and send .