Questions tagged [ipywidgets]

IPython widgets for the Jupyter Notebook

Read the docs

ipywidgets on github

708 questions
9
votes
1 answer

HTML ipywidgets state is not saved with the notebook

I use ipywidgets to display asynchronous results from processes. import ipywidgets as widgets results = widgets.HTML() display(results) It works well, results appear correctly, but when the notebook is saved, the widgets are not there anymore. Is…
jamborta
  • 4,821
  • 6
  • 28
  • 50
9
votes
3 answers

ipywidgets: Update one widget based on results from another

I am using widgets in IPython that allows the user to repeatedly search for a phrase and see the results (different titles) in another widget (a selection widget) and then select one of the results. In short: search_text = widgets.Text(description =…
hmelberg
  • 197
  • 1
  • 2
  • 7
8
votes
2 answers

Embed widgets with jupyter-cadquery (threejs): wrong position on load

I am using jupyter-cadquery to visualize some 3D models made with CadQuery. When visualizing the models on a Jupyter notebook, everything works as expected. But when trying to embed the widget in an HTML document, it seems the camera, on load, is…
Peque
  • 10,375
  • 7
  • 48
  • 83
8
votes
2 answers

How can I use Asynchronous Widgets on jupyter lab?

How can I use Asynchronous Widgets on jupyter lab? I'm trying to reproduce the official Asynchronous Widgets-Example on jupyter lab, but the await never continues. Setup / reproduction docker run --rm -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes…
wotanii
  • 1,507
  • 11
  • 27
8
votes
0 answers

Change date format of ipywidgets.DatePicker

How to change format of dates for DatePicker from ipywidgets? Default format is 'mm/dd/yyyy' and I want to set it to 'yyyy-mm-dd'?
Slavka
  • 806
  • 2
  • 10
  • 22
8
votes
5 answers

Jupyter notebook: Widget Javascript not detected

Question: I installed python3 and jupyter notebook using pip3 in MacOs 10.9. When I try to run the widget it gives error that there is no javascript widget. I have python3 and R kernels installed in Jupyter-notebook. Code: from ipywidgets import…
Bhishan Poudel
  • 1
  • 9
  • 63
  • 108
8
votes
3 answers

ipywidgets, how to change slider's value display precision

In jupyter,I have the following code to create a slider control for my variable r using ipywidgets. from ipywidgets import interact, interactive, fixed, interact_manual import ipywidgets as widgets r = 0.9992 def sl(r=0.9992): global ar ar…
J_yang
  • 2,179
  • 3
  • 24
  • 47
8
votes
4 answers

Clear widget area of a cell in a Jupyter notebook from within notebook

I'm wondering if it's possible to clear the widget area of a cell in a Jupyter notebook from the notebook side (ie within Python). IPython.display.clear_output() only clears the cell's output area not the widget area. Update: this still seems to be…
nedned
  • 3,184
  • 7
  • 35
  • 39
8
votes
3 answers

How to use interactive with a Box containing widgets?

Using interactive is fairly simple with multiple widgets, for example: interactive(foo, w1=widget1, w2=widget2, ...) However I would like to layout these widgets in a specific manner, using combinations of VBox and HBox. Question is, how can I use…
7
votes
2 answers

Controlling figure height when using interactive plots in jupyter lab

I'm trying to use a combination of JupyterLab and the latest ipywidgets to have a basic graphic interface to explore some data. However, I cannot find a way to set up the figure height for the interactive plot The notebook loads some file, then the…
Alessio Arena
  • 338
  • 1
  • 8
7
votes
2 answers

Arranging widgets in ipywidgets interactive

I have this interactive graph code using ipywidgets; but not sure how to arragne the each variable inside the interactive function in widgets. the default layout is vertical. But I want to arrange them in horizontal way. import matplotlib.pyplot as…
Bernad Peter
  • 354
  • 3
  • 10
7
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,321
  • 4
  • 17
  • 24
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
  • 1,951
  • 14
  • 21
7
votes
4 answers

Uploading files using Browse Button in Jupyter and Using/Saving them

I came across this snippet for uploading files in Jupyter however I don't know how to save this file on the machine that executes the code or how to show the first 5 lines of the uploaded file. Basically I am looking for proper commands for…
Mona Jalal
  • 24,172
  • 49
  • 166
  • 311
7
votes
3 answers

Is it actually possible to pass data (callback) from mpld3 to ipython?

There is a lot of amazing possibilities to create animated pictures using mpld3. However, it seems that all the "moving parts" are responsibility of JavaScript. Moreover, there are lots of requests on the internet and Stack Overflow where people…
Sergey Dovgal
  • 495
  • 4
  • 19
1
2
3
47 48