Skip to content

FigureWidget doesn't update in Jupyter Notebook #1404

Open
@ubershmekel

Description

@ubershmekel

This 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions