I am trying to nest a plotly chart within some html in a python cgi script. The example given in help(plotly.offline.plot):
from plotly.offline import plot
import plotly.graph_objs as go
plot([go.Scatter(x=[1, 2, 3], y=[3, 2, 6])], filename=‘my-graph.html’)
causes my page to error out. I cannot find any other examples of how to do this anywhere online. The remainder of the documentation is of the online use. Since the end game is to run this web app on a private network, I cannot use the online functionality.
Furthermore, the particular component I most strongly desire to use is the “output_type=‘div’” so that I can properly nest it within the html.
Any help would be greatly appreciated!