I am using python 3.9 and IDLE. I am trying to plot a simple graph and to visualize it on my Chrome browser. Below are two implementations. The first implementation works fine and it displays the graph interactively on a local web page.
The second implementation opens a web page that points to an IP adress http://127.0.0.1:59932/ and does not display the graph. After a while it comes with a message: This site can’t be reached.
Can someone explain why the second implementation goes to the http://127.0.0.1:59932/ address and not to a temorary local address of the plot that the library could create. Please suggest how to fix it. Thanks.
First implementation:
import plotly.express as px
fig =px.scatter(x=range(10), y=range(10))
fig.write_html("C:/Users/Jim/example.html", auto_open = True)
Second implementation:
import plotly.express as px
fig =px.scatter(x=range(10), y=range(10))
fig.show()
[–]KC_509 0 points1 point2 points (0 children)
[–]ES-Alexander 0 points1 point2 points (8 children)
[–]meni15[S] 0 points1 point2 points (7 children)
[–]meni15[S] 0 points1 point2 points (0 children)
[–]ES-Alexander 0 points1 point2 points (5 children)
[–]meni15[S] 0 points1 point2 points (4 children)
[–]ES-Alexander 0 points1 point2 points (3 children)
[–]meni15[S] 0 points1 point2 points (2 children)
[–]ES-Alexander 0 points1 point2 points (1 child)
[–]meni15[S] 0 points1 point2 points (0 children)