Has anyone been able to get Plotly working with Backtrader? I thought that the plot_mpl or mpl_plotly methods would work but I keep running into the following error. Am I just calling something incorrectly?
Traceback (most recent call last):
File "C:/Users/sgh31/PycharmProjects/Algorithmic Trading/AlpacaTutorial.py", line 79, in <module>
File "C:\Users\sgh31\PycharmProjects\Algorithmic Trading\venv\lib\site-packages\plotly\offline\offline.py", line 833, in plot_mpl
plotly_plot = tools.mpl_to_plotly(mpl_fig, resize, strip_style, verbose)
File "C:\Users\sgh31\PycharmProjects\Algorithmic Trading\venv\lib\site-packages\plotly\tools.py", line 470, in mpl_to_plotly
File "C:\Users\sgh31\PycharmProjects\Algorithmic Trading\venv\lib\site-packages\plotly\matplotlylib\mplexporter\exporter.py", line 45, in run
if fig.canvas is None:
AttributeError: 'list' object has no attribute 'canvas'
For reference, my code is below. I'm just using a simple strategy as a POC to see if Plotly can work with backtrader
# Store the figures returned by cerebro.plot() and plot them w/plotly
result = cerebro.plot()