IPython widgets for the Jupyter Notebook
Questions tagged [ipywidgets]
708 questions
58
votes
8 answers
How to get ipywidgets working in Jupyter Lab?
In Jupyter Notebook, ipywidgets work fine, however they seem to not work in Jupyter Lab (which is supposedly better than Notebook).
I followed these directions.
Step 1: Installed Node.js (https://nodejs.org/en/)
Step 2: Installed requirements on…
![](../../users/profiles/9565427.webp)
user5601
- 708
- 1
- 5
- 8
53
votes
7 answers
IPython Notebook ipywidgets does not show
I created a table with an interactive slider that allows me to toggle between different periods on my table. It was working for the past few days, until today, when I re-ran the notebook, the slide bar doesn't show anymore. No error messages appear.…
![](../../users/profiles/6143792.webp)
Cliff Chew
- 726
- 1
- 6
- 15
27
votes
4 answers
Ipywidgets with Google Colaboratory
I am trying to use ipywidgets with Google Colaboratory, and (as with plotly) the simplest example from the docs does not work. The code below shows a slider in a local notebook but only returns 10 and in a Google notebook.
!pip…
![](../../users/profiles/4322192.webp)
elz
- 3,581
- 2
- 21
- 28
22
votes
2 answers
Really confused with Jupyter Notebook, Lab, extensions, and ipywidgets
I want to create an interactive JupyterLab Notebook application, and I need to create a series of custom Widgets. So I started looking into this matter, and the more I look the more confused I become. To make things simple I will ask a bunch of…
![](../../users/profiles/2301114.webp)
AstrOne
- 2,831
- 3
- 25
- 46
21
votes
2 answers
Using Ipython ipywidget to create a variable?
This seems really simple but I have not been able to find a single example or to solve this myself. How do I use an ipywidget widget to create or return a python variable/object, such as a list or string, that can be used in a following cell?
![](../../users/profiles/4049396.webp)
Little Bobby Tables
- 3,724
- 4
- 25
- 43
17
votes
1 answer
Interactive matplotlib using ipywidgets
I want to implement an interactive plot using Matplotlib and ipywidgets in IPython (python3). So, how I can do this efficiently (change smoothly without delay)?
And another question is why this code works?!
from ipywidgets import *
import numpy as…
![](../../users/profiles/1219598.webp)
Yas
- 3,443
- 1
- 29
- 22
16
votes
4 answers
Dynamically changing dropdowns in IPython notebook widgets and Spyre
I have a dropdown in an IPython notebook (as part of the HTML widgets) and in a Spyre app (as a dropdown element), say to pick a continent and I'd like to add a second dropdown to select the country within the continent. Now obviously the options…
![](../../users/profiles/944823.webp)
Ondrej
- 442
- 1
- 3
- 9
14
votes
1 answer
using ipywidgets in jupyter notebook: how to set focus?
Is it possible to give a jupyter notebook widget the focus?
I can't see documentation or hints in the code about this?
![](../../users/profiles/401226.webp)
Tim Richardson
- 4,127
- 5
- 32
- 59
13
votes
2 answers
Jupyter: embed live interactive widgets
According to the Jupyter blog here, it is now possible to embed interactive widgets in a static webpage:
Live interactive widgets can now be embedded into static web pages or blogs by inserting an html snippet containing the serialized widget…
![](../../users/profiles/4058611.webp)
Ely
- 408
- 4
- 12
12
votes
3 answers
How to display matplotlib plots in a Jupyter tab widget?
I am having trouble displaying plots inside of Jupyter tab widgets. Consider the following snippet:
import matplotlib.pyplot as plt
import pandas as pd
import ipywidgets as widgets
import numpy as np
out1 = widgets.Output()
out2 =…
![](../../users/profiles/1633770.webp)
Arthur Azevedo De Amorim
- 20,312
- 2
- 26
- 35
12
votes
1 answer
Place ipywidgets into HTML into Jupyter notebook
With the following minimal example, I can create buttons which interact with the Jupyter notebook and an HTML table, which is displayed in the notebook.
import ipywidgets
from IPython.display import display
from IPython.core.display import…
![](../../users/profiles/911441.webp)
Lukas
- 1,603
- 2
- 18
- 28
11
votes
4 answers
How to make an ipywidgets Image clickable?
I would like to make an Image instance in a jupyter notebook to respond to click events - how can we do this? I also want to be able to identify the image that was clicked.
It is simple to do so with buttons but not with images.
![](../../users/profiles/314548.webp)
Dror Hilman
- 4,741
- 7
- 33
- 50
11
votes
2 answers
iPyWidget with date slider?
I am wondering if there's an easy way to build an iPyWidget with a datetime slider. Right now it is easy to slide over integer or floating point ranges (e.g. numbers 1-10, decimals 0.01, 0.02, ...).
I imagine you could convert dates to floats or…
![](../../users/profiles/3830520.webp)
atkat12
- 2,402
- 6
- 17
- 19
10
votes
1 answer
Output widget appears outside tab widget when using nbconvert on jupyter notebook with ipywidgets
I created a notebook which should display plots in a tab widget. As far as I understand, to include something like plots in the tab widget, I need to wrap it in the output widget. In the notebook itself it works but when I convert it to html via…
![](../../users/profiles/3793311.webp)
Benedikt
- 105
- 7
10
votes
1 answer
How to display the full text in the button ipywidget?
I am creating an ipywidget button with some text. But the full text is not shown in the button:
The code I have used is as follows:
import ipywidgets as widgets
from IPython.display import display
button = widgets.Button(
description='Test…
![](../../users/profiles/1581090.webp)
Alex
- 34,021
- 64
- 178
- 371