FigureWidget doesn't update in Jupyter Notebook
See original GitHub issueThis snippet in a Python cell produces a chart, but the chart does not update to get the new title and new data.
import plotly.graph_objs as go
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
init_notebook_mode()
data = [go.Bar(
x=['giraffes', 'orangutans', 'monkeys'],
y=[20, 14, 23]
)]
layout = {'yaxis': {'range': [0, 25]}}
fig = go.FigureWidget(data, layout)
iplot(fig)
# The following code is ignored.
fig.data[0].y = (5,10,1)
fig.layout.title = "New title"
Plotly version: 3.5.0 Server Information: You are using Jupyter notebook. The version of the notebook server is: 5.7.4 The server is running on this version of Python: Python 3.7.1 (default, Dec 14 2018, 13:28:58) [Clang 4.0.1 (tags/RELEASE_401/final)]
Current Kernel Information: Python 3.7.1 (default, Dec 14 2018, 13:28:58) Type ‘copyright’, ‘credits’ or ‘license’ for more information IPython 7.2.0 – An enhanced Interactive Python. Type ‘?’ for help.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
FigureWidget doesn't print graph - Plotly Community Forum
Hi All, I have been using plotly for a while and it worked great until i had to use FigureWidget to interact with...
Read more >Plotly FigureWidgets doesn't get loaded in kaggle's notebook
This seems to be a known bug for the Kaggle Notebooks. I have found multiple posts within the Kaggle Discussion community.
Read more >Panel plots are not updating from widget inputs
Hi, I'm trying to build a POC app with a map (plotly.choropleth_mapbox) that updates given inputs from widgets (a slider, a text box, ......
Read more >Ipywidgets and plotly interactions - Jupyter Community Forum
FigureWidget (data=px.scatter(big_grid, x="coord1", y="coord2", ... Basically when i change dromp_elem the color doesn't adjust as i am ...
Read more >Plotly doesn't work in Ipython Notebooks : PY-18662 - YouTrack
When trying to run init_notebook_mode() for the plotly library in an Ipython Notebook, the cell never completes ( so it shows In[*], and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jonmmease When I do that - nothing is displayed after the cell completes.
Hi @ubershmekel ,
For the visual display of the
FigureWidget
to update you need to allow it to display itself as an ipywidget by making thefig
variable the last statement in a notebook cell. In particular, you can’t useiplot
. For example:Does that work for you?