0

I'm trying to run Plotly on PyCharm. Following code does not work:

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()

But this works on my colleague's laptop. When he runs the code, the figure is displayed on a browser with the address 127.0.0.1:some_port

Why can he run and I can't? Is it possible to run Plotly figures without using offline mode (I can run the code using plot but I prefer the other way around as all tutorials use the online mode)

iso_9001_
  • 2,655
  • 6
  • 31
  • 47
  • Can you expand on "does not work"? Are you seeing an error? What kind of window are you running this code in? In a console or a notebook or...? Also, is your colleague also using PyCharm? – nicolaskruchten Sep 06 '19 at 13:54
  • @nicolaskruchten I run this code in PyCharm. The code runs, there is no error but the figure does not appear in browser. – iso_9001_ Sep 06 '19 at 13:55
  • Could you try this? I hope the question is already answered here: https://stackoverflow.com/questions/50250010/plotly-chart-is-not-displayed-in-pycharm – Humaun Rashid Nayan Sep 06 '19 at 14:59

0 Answers0