Questions tagged [ipywidgets]

IPython widgets for the Jupyter Notebook

Read the docs

ipywidgets on github

973 questions
7
votes
0 answers

How to resize matplotlib figure to match ipywidgets.Output() size automatically?

I am building a webapp with interactive plots based on Jupyter and Voila. Inside the notebook I use ipywidgets for handling the interactivity and %matplotlib widget backend so I can update my plots without redrawing the whole figure (does not work…
Paloha
  • 558
  • 6
  • 14
7
votes
1 answer

use ipywidget interactive() with option manual=True

I am updating a jupyter notebooks with interactive widgets to a more recent version (ipywidgets 7.2.1). It used to have interactive() functions that were executed manually by clicking on a button (feature __manual=True). However now I cannot…
Ely
  • 498
  • 5
  • 14
7
votes
4 answers

How do I change a button label created with 'interact_manual' from 'ipywidgets'? and how do I change the size and color of that button?

How do I change a button label created with 'interact_manual' from 'ipywidgets'? and how do I change the size and colour of that button? Here is what I wrote from ipywidgets import interact,interact_manual def HDI_vs_CrimeRate(): #do some thing…
7
votes
1 answer

Return output of the function executed 'on_click'

How to get the output of the function executed on_click by ipywidgets.Button outside the function to use in next steps? For example, I want to get back the value of a after every click to use in the next cell of the jupyter-notebook. So far I only…
Ashish
  • 729
  • 1
  • 9
  • 23
7
votes
1 answer

How do you save the state of a widget in a Jupyter notebook?

I have a radio button widget in a Jupyter notebook and I want to save the selected state, preferrably in the notebook json. That doesn't seem to be happening when I save the notebook. The state gets lost and reset when you reopen the notebook. Is…
John Kitchin
  • 2,236
  • 1
  • 17
  • 25
7
votes
1 answer

Create a popup widget in IPython

I'm trying to create a Popup widget in Jupyter as described in this vid: from IPython.html import widgets which gives the following warning: ShimWarning: The IPython.html package has been deprecated. You should import from notebook instead.…
user
  • 5,370
  • 8
  • 47
  • 75
6
votes
1 answer

Click events in python plotly-dash Scatterpolar plot

I'd like to create two web pages which contain iframed plotly-dash graphs. I'd like to implement click events of the first graph to redirect to the other page (with more info about that specific datum) I followed this guide, but the click event is…
Jana Kundova
  • 61
  • 1
  • 3
6
votes
3 answers

How can I overcome "Error: Object 'jupyter.widget' not found in registry"?

I am running jupyterlab within jupyterhub on kubernetes. I am trying to display widgets using e.g. from ipywidgets import interact @interact(x=(0, 100, 10)) def p(x=50): pass Instead of the intended interactive widget, the lab notebook…
jtlz2
  • 7,700
  • 9
  • 64
  • 114
6
votes
2 answers

Embed widgets with pythreejs: wrong perspective and camera look-at

I am using pythreejs to visualize some 3D models. When visualizing the models on a Jupyter notebook, everything works as expected. But when trying to embed the widget in an HTML document, I am facing two problems: It seems the camera, on load, is…
Peque
  • 13,638
  • 11
  • 69
  • 105
6
votes
1 answer

How to upload a large file using the ipywidgets fileupload?

There is a server with Jupyterhub. It has remote access via a browser (IP address ONLY). User can upload large files (several GB) using the ipywidgets.fileupload. But I can't normally upload files more 100MB: Files abouts 200MB upload ~10 minutes.…
AleksandrSome
  • 71
  • 1
  • 5
6
votes
1 answer

How do I interact a JupyterLab extension with Python kernel?

Is there a way to create an extension for Jupyter Lab that I can manipulate through the Python cells in my notebook? In Jupyter Notebook, this could be achieved via an IPywidget, which had a Python backend and Javascript front-end. These two could…
6
votes
1 answer

Ipywidget Accordion default behaviour

Ipywidget accordion is expanded by default when the notebook is executed for the first time. How to make the accordion collapsed by default ? Thanks in Advance.
Vishma Dias
  • 630
  • 6
  • 11
6
votes
1 answer

Jupyter: How to update plot on button click (ipywidgets)

I am using Jupyter and trying to make my plots interactive. So I have a plot. I have a ipywidgets button. On button click I need to update plot, like interact do with sliders. But I can't. It works only if matplotlib uses 'notebook' backend, but it…
Anton Ovsyannikov
  • 1,010
  • 1
  • 12
  • 30
6
votes
0 answers

ipywidgets: link two widgets so that when one updates, the other also updates

I am trying to link two ipython widgets together so that when one widget updates (slider moves, text inputted, etc) another widget also updates. I have found that you can link the values together using traitlets.link, but cannot find a way to link…
KEL
  • 61
  • 4
6
votes
1 answer

Clear MatPlotLib figure in Jupyter Python notebook

I want a 3D scatter plot in MatPlotLib to be rotated interactively in a Jupyter Python notebook. For that reason I integrated a slider from ipywidgets to update the view angle. The test code below shows what I am trying to achieve. The problem is…
Pieter
  • 2,621
  • 4
  • 19
  • 26