Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 546b9fc

Browse files
authored
Merge pull request #25098 from anntzer/slidervalinitkw
Correctly pass valinit as keyword in SliderTool.
2 parents 11e37ac + 3a6c374 commit 546b9fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/widgets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,8 +1873,8 @@ def __init__(self, targetfig, toolfig):
18731873
# The last subplot, removed below, keeps space for the "Reset" button.
18741874
for name, ax in zip(names, toolfig.subplots(len(names) + 1)):
18751875
ax.set_navigate(False)
1876-
slider = Slider(ax, name,
1877-
0, 1, getattr(targetfig.subplotpars, name))
1876+
slider = Slider(ax, name, 0, 1,
1877+
valinit=getattr(targetfig.subplotpars, name))
18781878
slider.on_changed(self._on_slider_changed)
18791879
self._sliders.append(slider)
18801880
toolfig.axes[-1].remove()

0 commit comments

Comments
 (0)