Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Interactivity in offline mode

I am trying to understand how to add interactions based on events using only the Python API, both on the Jupyter Notebook and from a standard Python interpreter. I am struggling with at least the following two issues:

  1. When working in the Notebook I can add IPython widgets and have them interact with the Figure by attaching an interaction to an update function that performs some data/layout update. However, it seems to me that with this approach I need to re-plot the Figure using offline.iplot in order to see the change happening, i.e. it is not possible to update the same plot object with only the updated features. For example, if I only want to change the title, I still need to re-create the whole plot. If this is the case, then for example it is virtually impossible to use continuous_update=True when operating a slider. Is that correct?

  2. Does Plotly provide widgets when working from “normal” python/ipython. Most examples in the documentation are based on IPython widgets which I understand to be available only via the Notebook. I can only see one example where a dropdown menu is created directly in plotly using updatemenus/buttons keywords in the Layout. However, I cannot find a reference for those keywords and whether there are similar keywords for creating different widgets. I would appreciate if anyone could provide an orientation on how to add interactivity using only Python in a non-Notebook environment.
    Thanks a lot!