Skip to content

improve (matplotlib.widgets.Slider) doc + input validation #7687

Closed
@sbowa

Description

@sbowa

This minimal example throws an error (without crashing) when

  1. the slider is initialized with a slidermin/slidermax value
  2. the slider is moved with the mouse
    (the program does not crash, but the slider also does not respond)

Minimal example:

import matplotlib.pyplot as plt
from matplotlib.widgets import Slider

fig, ax = plt.subplots()
slider = Slider(ax=ax, label='', valmin=0.0, valmax=24.0, valinit=15.0,
                slidermin=10.0, slidermax=20.0)
plt.show()

Fix follows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesDocumentation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions