question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FloatSlider with very small values

See original GitHub issue

The float widget does not display properly and is not able to “slide” (except to min and max values) if the values are very small:

order = 1e-8
widgets.FloatSlider(min=1.*order, max =5.*order, step= 0.05*order, value = 2.*order)

It looks like the smallest step value is hard-coded, however with a quick look I was not able to find anything of sort

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

10reactions
jasongroutcommented, May 16, 2018

A workaround is to use the Selection slider and to generate the values and labels you want.

from ipywidgets import SelectionSlider
values=[i*10**-8 for i in range(101)]
SelectionSlider(options=[("%g"%i,i) for i in values])

The much more invasive change is to use a different slider implementation, like mentioned above.

2reactions
multivac61commented, May 16, 2018

This is a real pain in the neck. Is there any updates or ideas on how to resolve this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

python 3.x - How to increase slider length in ipywidgets
You can use the Layout component. Try: from ipywidgets import Layout, interact, IntSlider import ipywidgets as widgets def f(x): return x ...
Read more >
FloatSlider — Panel v0.14.2
The FloatSlider widget allows selecting selecting a numeric floating-point value within a set bounds using a slider. For more information about listening to ......
Read more >
Using step lower than 0.01 for slider with floats
I am using a slider with float values, but it seems that choosing a step lower than 0.01, for example 0.001, is treated...
Read more >
Interactive quiver plot (figure_factory with ipython ...
I'm looking for a way to render a quiver plot interactive with the use of ipywidgets. Say for example I have the following...
Read more >
updating a matplotlib plot with `observe` without generating ...
FloatSlider (value=0.5, min=0.1, max=1, step=0.1, description=('Slider')) ... Here's a small self-contained version of your example, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found