Closed
Description
Matplotlib Figure
object is not supporting validate
method
plotly.py/plotly/plotly/plotly.py
Line 282 in dbe8adb
Sample Code:
fig, ax = plt.subplots()
ax.plot(y0, label='y0')
ax.plot(y1, label='y1')
ax.plot(y2, label='y2')
ax.plot(capacity, label='capacity')
# set all traces' "fill" so that it fills to the next 'y' trace
update = {'data':[{'fill': 'tonexty'}]}
# strip style just lets Plotly make the styling choices (e.g., colors)
plot_url = py.iplot_mpl(fig, update=update, filename='mpl-stacked-line')
Error:
site-packages\plotly\plotly\plotly.pyc in iplot_mpl(fig, resize, strip_style, update, **plot_options)
280 if update and isinstance(update, dict):
281 fig.update(update)
--> 282 fig.validate()
283 elif update is not None:
284 raise exceptions.PlotlyGraphObjectError(
AttributeError: 'Figure' object has no attribute 'validate'
And for strip_style
plotly.py/plotly/plotly/plotly.py
Line 257 in dbe8adb
Sample Code:
plot_url = py.iplot_mpl(fig, update=update, strip_style=True, filename='mpl-stacked-line')
Error:
C:\Anaconda\Anaconda2\lib\site-packages\plotly\plotly\plotly.pyc in iplot_mpl(fig, resize, strip_style, update, **plot_options)
277
278 """
--> 279 fig = tools.mpl_to_plotly(fig, resize=resize, strip_style=strip_style)
280 if update and isinstance(update, dict):
281 fig.update(update)
C:\Anaconda\Anaconda2\lib\site-packages\plotly\tools.pyc in mpl_to_plotly(fig, resize, strip_style, verbose)
467 renderer.resize()
468 if strip_style:
--> 469 renderer.strip_style()
470 if verbose:
471 print(renderer.msg)
C:\Anaconda\Anaconda2\lib\site-packages\plotly\matplotlylib\renderer.pyc in strip_style(self)
737 def strip_style(self):
738 self.msg += "Stripping mpl style, deleting keys from data and layout\n"
--> 739 self.plotly_fig.strip_style()
AttributeError: 'Figure' object has no attribute 'strip_style'
Metadata
Metadata
Assignees
Labels
No labels