ipywidgets

geodataframe is not defined

geodataframe is not defined Question: I’m working with Jupiter and ipywidgets and Ipyleaflet , trying to draw polygons on a map and saving to a geodataframe. I have the following in a notebook cell: zoom = 15 from ipywidgets import Output, interact import ipywidgets from __future__ import print_function import ipyleaflet import geopandas as gpd import …

Total answers: 2

positioning ipywidget slider to the side of a figure

positioning ipywidget slider to the side of a figure Question: I am new to ipywidget. I am using an ipywidget slider to change images in a matplotlib figure. However I would like to change the position of the slider to put it next to the image. I’ve already looked for similar questions but none satisfies …

Total answers: 1

my ipywidgets work in jupyter notebook, but not in html file after exporting

my ipywidgets work in jupyter notebook, but not in html file after exporting Question: i can press a button and get it to trigger events within the notebook, but when i export a html file, they no longer work. import ipywidgets as widgets from IPython.display import HTML from ipywidgets import interactive from ipywidgets import interact …

Total answers: 1

Jupyter Notebook – ipywidgets – Automatic feedback from selected

Jupyter Notebook – ipywidgets – Automatic feedback from selected Question: I am trying to create a function in a Jupyter notebook to: Display with an ipywidget a series of radio buttons from a list of options. Automatically display the selected value. Save the selected value in a variable. So far, I managed step 1 (widget …

Total answers: 2

Can I get Poetry to reinstall ipykernel after installing ipywidgets?

Can I get Poetry to reinstall ipykernel after installing ipywidgets? Question: I’m developing a Python package. I used Poetry to set up my development environment; I intend to distribute my code through PyPI. One of my dependencies requires ipywidgets<7.7.2, as documented here. Due to a bug (mentioned here), ipykernel must be reinstalled after ipywidgets is …

Total answers: 1

Clearing decorator ipywidgets

Clearing decorator ipywidgets Question: I have a function which plots a graph with a couple ipywidgets as inputs: from IPython.display import clear_output def on_clicker(button): clear_output() @widgets.interact(dropdown=widgets.Dropdown(…), datepicker=widgets.DatePicker(…) def grapher(dropdown, datepicker): global recalculate … some graphing stuff display(recalculate) recalculate.on_click(on_clicker) The idea is that clicking recalculate calls the graph again and clears the past output. However, when …

Total answers: 1

How do you plot on a premade matplotlib plot with IPyWidgets?

How do you plot on a premade matplotlib plot with IPyWidgets? Question: I have a scenario where I would like to initialize the plot and plot a bunch of stuff on it before I run a widget on it. However, the jupyter widget refuses to plot on my already made plot. Instead, nothing shows up. …

Total answers: 2

Mixing Plotly/ipywidgets to modify the x axis of a scatter plot

Mixing Plotly/ipywidgets to modify the x axis of a scatter plot Question: I want to mix Plotly with a dropdown widget, the idea being to make some scatter plots and modify the x axis through the widget. Let’s say that my dataset is the following : import sea born as sns import plotly.graph_objects as go …

Total answers: 1

How to include string after number in IntSlider?

How to include string after number in IntSlider? Question: I wanted to increase the size of the description of my variables and also include the measurement units after the value as indicated in this figure. My code: %matplotlib inline from ipywidgets import interactive import matplotlib.pyplot as plt import numpy as np a = widgets.IntSlider(description=’Força’, value=500, …

Total answers: 1

Python: ipywidgets not showing output

Python: ipywidgets not showing output Question: I wrote a python script that should have a data frame as output, but it does not show any output. Below is the python code: import pandas as pd import numpy as np import ipywidgets as widgets import datetime from ipywidgets import interactive from IPython.display import display, Javascript from …

Total answers: 1