IPyWidgets [source]
| Jupyter Notebooks | Documentation |
This notebook is a compilation of the documentation linked above, both the docs for IPyWidgets and the sample notebooks available on the site. I do not claim ownership of any of this material, and the only parts that are my own are my experimentation with the functions and extra explanations based on my own understanding of working with this module.
Jump to: ● Top ● Widget Intro ● Widget Events ● Widget Properties ● Linking Widgets ● Numeric Widgets ● Widget Styling ● Boolean Widgets ● Widget Layout ● Selection Widgets ● Image Layout & Sizing ● String Widgets ● Image Manipulation ● Play Animation ● Image Browser ● Tag Widgets ● Layout Templates ● Date and Time ● Using Interact ● File Upload ● Interactive ● Game Controller ● Interactive Output ● Containers and Layout ● Widgets: Low-Level ● Aligning Widgets ● Asynchronous Widgets ● Output Widgets ● Embedding ● Email Widget ● Math Operations
# Install in terminal in this order, or ipywidgets makes everything EXPLODE!
# !pip install --upgrade sympy
# !pip install --upgrade ipywidgets
# !pip install --upgrade jupyterlab_widgets
# !pip install --upgrade ipywidgets
# !pip install --upgrade scikit-image
# !pip install --upgrade sympy
# !pip install --upgrade bqplot
# !pip update --upgrade ipyleaflet
from urllib.request import urlretrieve
helpers="http://www.evanmarie.com/content/files/helpers/helpers.py"
urlretrieve(helpers, "helpers.py")
import helpers as h
from helpers import p, sp, d, pretty
import ipywidgets as widgets
Jump to: ● Top ● Widget Intro ● Widget Events ● Widget Properties ● Linking Widgets ● Numeric Widgets ● Widget Styling ● Boolean Widgets ● Widget Layout ● Selection Widgets ● Image Layout & Sizing ● String Widgets ● Image Manipulation ● Play Animation ● Image Browser ● Tag Widgets ● Layout Templates ● Date and Time ● Using Interact ● File Upload ● Interactive ● Game Controller ● Interactive Output ● Containers and Layout ● Widgets: Low-Level ● Aligning Widgets ● Asynchronous Widgets ● Output Widgets ● Embedding ● Email Widget ● Math Operations
Introduction to Widgets
repr
- Widgets have their own display repr which allows them to be displayed using IPython’s display framework.
- Constructing and returning an IntSlider automatically displays the widget (as seen below).
- Widgets are displayed inside the output area below the code cell. Clearing cell output will also remove the widget.