Reputation: 878
In a Jupyter notebook, I would like to make an interactive slider with two control points. It's easy to do with a single control see this example:
But here's an example of what I really want, it is called an interval slider (Mathematica does this nicely):
Is this possible to do with ipywidgets or some perhaps other python package?
Upvotes: 8
Views: 2460
Reputation: 334
I think what you're getting at is to have arbitrarily many sliders on the same bar, which is what I found this post while looking for, but range sliders do exist (at least they do now; this question is four years old).
widgets.FloatRangeSlider(
value=[5, 7.5],
min=0,
max=10.0,
step=0.1,
description='Test:',
disabled=False,
continuous_update=False,
orientation='horizontal',
readout=True,
readout_format='.1f',
)
(illustrative snippet stolen directly from linked doc)
Upvotes: 2