Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly pass valinit as keyword in SliderTool. #25098

Merged
merged 1 commit into from Jan 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/matplotlib/widgets.py
Expand Up @@ -1873,8 +1873,8 @@ def __init__(self, targetfig, toolfig):
# The last subplot, removed below, keeps space for the "Reset" button.
for name, ax in zip(names, toolfig.subplots(len(names) + 1)):
ax.set_navigate(False)
slider = Slider(ax, name,
0, 1, getattr(targetfig.subplotpars, name))
slider = Slider(ax, name, 0, 1,
valinit=getattr(targetfig.subplotpars, name))
slider.on_changed(self._on_slider_changed)
self._sliders.append(slider)
toolfig.axes[-1].remove()
Expand Down