You can build web apps in R such as this one. Notice that there is a plot, there are drop-down menus, and that the graph updates live with the changes.

Is there something similar to this for Python? My goal is to create an interactive chart in Python where the user moves sliders/inputs information and the chart changes live, but I have had no success.

  • Why not use the R bindings for python?
    – ivanivan
    Feb 2, 2017 at 20:10
  • I prefer to only use Python and its associated libraries if possible Feb 2, 2017 at 20:18
  • Ultimately, this can only be accomplished in JavaScript, so the only way you could do it in Python would be to somehow generate JavaScript in Python, as with pyjs. I'd recommend using JavaScript directly—it's hard to see the benefit from something like pyjs in a case like this. Feb 2, 2017 at 22:43

1 Answer 1


Jupyter Notebook, formerly IPython Notebook, has become a very popular tool in the data science community. Google Colaboratory is Google's free Jupyter notebook environment that requires no setup and runs entirely in the cloud.

Here are three ways to make interactive charts in Jupyter Notebook / Google Colab.

  1. iPython Widgets

    You can interact with other people’s code in-browser, eliminating the need to download anything. See an example of a simple dropdown widget that creates a seaborn barplot at 3 Ways to Make Interactive Graphs in Jupyter Notebooks

    You can install Jupyter Notebook, seaborn and iPython Widgets with pip with the command:

    python -m pip install jupyter seaborn ipywidgets  
    jupyter nbextension enable --py --sys-prefix widgetsnbextension  

    Here is Python code for displaying an example bar chart inline in Jupyter Notebook. barchart.csv is an ordinary csv file that contains the input data, 8 lines of text, 4 items per line separated by commas as delimiters.

    enter image description here

  2. Plotly

    Plotly Python Library is an open source, visualization library that has an online chart creation tool. Plotly has a free community edition.

  3. PivotTable.js

    PivotTable.js is a JavaScript pivot table and pivot chart library with drag’n’drop interactivity, that can be used with Jupyter Notebook via the pivottablejs module. To install PivotTable.js run the following command:

    python -m pip install pivottablejs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.