Closed BlackFireAlex closed 3 years ago
Could you please post a minimal reproducible example that works in a standard jupyter notebook but fails using the plugin?
import plotly.graph_objects as go
fig = go.Figure(
data=[go.Bar(y=[2, 1, 3])],
layout_title_text="A Figure Displayed with fig.show()"
)
fig.show()
This work perfectly in Jupyter Serveer or Pycharm
It looks like this isn't working because the plugin doesn't execute javascript contained within the response. However, even when executing said script, the above example fails with Uncaught TypeError: require.undef is not a function
which might be a problem with the right javascript libraries being available (or not) for plotly. Are you familiar enough with plotly to comment on that issue?
Sorry for the late reply. Could you try this alternate version and tell me how it goes ? All the needed imports are listed here
import plotly.offline as py
import plotly.graph_objs as go
import plotly.figure_factory as ff
import pandas as pd
py.init_notebook_mode(connected=True)
df = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/school_earnings.csv")
table = ff.create_table(df)
py.iplot(table, filename='jupyter-table1')
Similar to #20, I think this is out of scope for this plugin; it is not meant to provide a full Jupyter experience but simply allow for evaluation of small code snippets. Contributions welcome, however.
The server doesn't send a response when I try to plot something with plotly:
The console gets stuck with this
And I can't run code after that