Valmin, valmax of slider

Can we update the valmin or valmax of slider ? I have a time series data with different time ranges. The user has the option to select the time range for which he wants to see the data. so in the slider the valmax or valmin needs to be updated with each plotting action.
Can this be done ?

don’t know if this will work, but self.slidermin & self.slidermax are attributes of the slider so you can try changing their values on each update https://matplotlib.org/_modules/matplotlib/widgets.html#Slider

You will also need to check that the value is still in the range and the view limits on the host Axes.

I would be :+1: to a PR adding a update_range(vmin, vmax) method to Slider.

Thanks, this is a needed functionality. Changing any property except the slider value (set_val) doesn’t make any changes to the slider’s UI. Ex- if my initial max value was 60 and now I change it to 120, then the slider is completley filled (fill color) at 60 itself

@Nayal If you are interested in working on this, the class is implemented at https://github.com/matplotlib/matplotlib/blob/3e439a4c9960e97550a3f75365f51110cf154dc2/lib/matplotlib/widgets.py#L238-L514 .

@tacaswell .Sure. I will give it a try once I finish my current project