Skip to content

AttributeError when producing an Interactive plot #1762

@sursu

Description

@sursu

Plotly 4.1.0

I get an error when I try to run @jonmmease 's Interact notebook:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/opt/anaconda3/lib/python3.7/site-packages/ipywidgets/widgets/interaction.py in update(self, *args)
    254                     value = widget.get_interact_value()
    255                     self.kwargs[widget._kwarg] = value
--> 256                 self.result = self.f(**self.kwargs)
    257                 show_inline_matplotlib_plots()
    258                 if self.auto_display and self.result is not None:

<ipython-input-27-8163515321f0> in update(a, b, color)
      4 def update(a=3.6, b=4.3, color='blue'):
      5     with fig.batch_update():
----> 6         scatt.x=xs
      7         scatt.y=np.sin(a*xs-b)
      8         scatt.line.color=color

/opt/anaconda3/lib/python3.7/site-packages/plotly/basedatatypes.py in __setattr__(self, prop, value)
    349         else:
    350             # Raise error on unknown public properties
--> 351             raise AttributeError(prop)
    352 
    353     def __getitem__(self, prop):

AttributeError: x

I get the same error wen I run the notebook with Binder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions