question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iplot doesn't display the graph at first in a new browser

See original GitHub issue

hi, I use Plotly with Jupyter Notebook and it seems that the function to call ipilot in offline mode doesn’t always show the graph.

for example:

import plotly
import plotly.graph_objs as go
plotly.offline.init_notebook_mode()

trace = go.Bar(x=[2, 4, 6], y= [10, 12, 15])
data = [trace]
layout = go.Layout(title='A Simple Plot', width=800, height=640)
fig = go.Figure(data=data, layout=layout)

plotly.offline.iplot(fig)

after accessing the Jupyter Notebook online, when I first go in the notebook with the preview’s code, it will not show the graph, I’ll need to refresh the tab of the notebook after some time to see it.

there is no error in the console nor anywhere.

plotly version : 1.12.0 python version : 3.4.3 IPython version : 4.2.0

Kevin.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:25 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
XiaofeiQiancommented, Aug 17, 2016

I change plotly version to 1.9.5 and the fig show again. I find “init_notebook_mode()” has no parameter at version 1.9.5. But has a default parameter at version 1.12.6.

2reactions
statham-stonecommented, Apr 17, 2018

save the notebook and refresh the brower

it works for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plotly chart not showing in Jupyter notebook - Stack Overflow
I followed the steps on the Plotly website and the chart still doesn't show in the notebook. This is my code for the...
Read more >
Plotly doesn't load most of the time - Plotly Python
py file from the Windows native command line and got the same behavior. Again, your code shows the graph the first time I...
Read more >
[fastpages] Plotly plot doesn't load, JS error in browser - nbdev
The first cell shows in the notebook, but #hide prevents it from being rendered by fastpages and throwing errors in the browser. The...
Read more >
Retain current plot when adding new plots - MATLAB hold
MATLAB ® adjusts axes limits, tick marks, and tick labels to display the full range of data. If axes do not exist, then...
Read more >
AWR Design Environment User Guide: 7.1. Working with Graphs
Display of a live graph, schematic, system diagram, or layout (AWR Microwave Office ... Right-click Graphs in the Project Browser and choose New...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found