4

I have just started learning Plotly and it shows graph and chart correctly in Jupyter Notebook. But when I run the same script .py in text editor or from cmd it open a window in browser but then it shows

Unable to Connect Firefox can’t establish a connection to the server at 127.0.0.1:5875. and did not shows an chart or graph.

Anyone has idea how to do this? Basically I want to show data from csv in Web Browser.

2
  • If you use %run in front of your script name to run it from within the Jupyter notebook, does that show your plot? Commented Mar 15, 2020 at 14:57
  • 1
    Yes in Jupyter notebook, everything works fine and even when I run simple script with .py extension it runs without error but nothing shows in browser. Commented Mar 16, 2020 at 5:06

1 Answer 1

8

The write_html exports the Plotly figure as an html file and opens it on the web browser.

figure.write_html( 'output_file_name.html', 
                   auto_open=True )

Further information plotly.io.write_html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.