Skip to content

Note

Click here to download the full example code

Log slider widget#

A logarithmic scale range slider widget.

log slider

Out:

<FunctionGui slider(input=1.0)>


from magicgui import magicgui


@magicgui(
    auto_call=True,
    result_widget=True,
    input={"widget_type": "LogSlider", "max": 10000, "min": 1, "tracking": False},
)
def slider(input=1):
    """Logarithmic scale slider."""
    return round(input, 4)


slider.show(run=True)

Total running time of the script: ( 0 minutes 0.047 seconds)

Download Python source code: log_slider.py

Download Jupyter notebook: log_slider.ipynb

Gallery generated by mkdocs-gallery