---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-8-8d22edf5a92c> in <module>()
----> 1 plotly_fig = tls.mpl_to_plotly(plotter('bitcoin',1,'orange'))
2 plotly_fig["layout"]["showlegend"] = True
3 plotly_fig["layout"]['hovermode'] = 'x'
4 iplot(plotly_fig, filename='ons1')
~\AppData\Local\Continuum\anaconda2\envs\python3\lib\site-packages\plotly\tools.py in mpl_to_plotly(fig, resize, strip_style, verbose)
467 if matplotlylib:
468 renderer = matplotlylib.PlotlyRenderer()
--> 469 matplotlylib.Exporter(renderer).run(fig)
470 if resize:
471 renderer.resize()
~\AppData\Local\Continuum\anaconda2\envs\python3\lib\site-packages\plotly\matplotlylib\mplexporter\exporter.py in run(self, fig)
47 import matplotlib.pyplot as plt
48 plt.close(fig)
---> 49 self.crawl_fig(fig)
50
51 @staticmethod
~\AppData\Local\Continuum\anaconda2\envs\python3\lib\site-packages\plotly\matplotlylib\mplexporter\exporter.py in crawl_fig(self, fig)
114 props=utils.get_figure_properties(fig)):
115 for ax in fig.axes:
--> 116 self.crawl_ax(ax)
117
118 def crawl_ax(self, ax):
~\AppData\Local\Continuum\anaconda2\envs\python3\lib\site-packages\plotly\matplotlylib\mplexporter\exporter.py in crawl_ax(self, ax)
128 if(hasattr(text, 'get_text') and text.get_text()):
129 self.draw_text(ax, text, force_trans=ax.transAxes,
--> 130 text_type=ttp)
131 for artist in ax.artists:
132 # TODO: process other artists
~\AppData\Local\Continuum\anaconda2\envs\python3\lib\site-packages\plotly\matplotlylib\mplexporter\exporter.py in draw_text(self, ax, text, force_trans, text_type)
209 coordinates=coords,
210 text_type=text_type,
--> 211 style=style, mplobj=text)
212
213 def draw_patch(self, ax, patch, force_trans=None):
~\AppData\Local\Continuum\anaconda2\envs\python3\lib\site-packages\plotly\matplotlylib\renderer.py in draw_text(self, **props)
518 """
519 self.msg += " Attempting to draw an mpl text object\n"
--> 520 if not mpltools.check_corners(props['mplobj'], self.mpl_fig):
521 warnings.warn(
522 "Looks like the annotation(s) you are trying \n"
~\AppData\Local\Continuum\anaconda2\envs\python3\lib\site-packages\plotly\matplotlylib\mpltools.py in check_corners(inner_obj, outer_obj)
40
41 def check_corners(inner_obj, outer_obj):
---> 42 inner_corners = inner_obj.get_window_extent().corners()
43 outer_corners = outer_obj.get_window_extent().corners()
44 if inner_corners[0][0] < outer_corners[0][0]:
~\AppData\Local\Continuum\anaconda2\envs\python3\lib\site-packages\matplotlib\text.py in get_window_extent(self, renderer, dpi)
918 self._renderer = renderer
919 if self._renderer is None:
--> 920 raise RuntimeError('Cannot get window extent w/o renderer')
921
922 bbox, info, descent = self._get_layout(self._renderer)
RuntimeError: Cannot get window extent w/o renderer