I am trying to change the limits of a Slider Widget in runtime, in the following code:
def draw(self):
self.fig, ax = plt.subplots()
plt.subplots_adjust(left=0.25, bottom=0.40)
self.Smile.getVolLimSmile(self.Smile.strike)
vols = pd.DataFrame(self.Smile.smile,index = self.Smile.strike)
self.axes = plt.gca()
self.axes.plot(self.Smile.strike, vols*100.) ####
axatmvol = plt.axes([0.25, 0.30, 0.65, 0.03], axisbg=axcolor)
self.satmvol = Slider(axatmvol, 'atmvol', 0.1, 50, valinit=self.atmvol)
I see that the Slider object gives access to the max and min value (originally set at 0.1 and 50 in the example) via the valmin and valmax properties, however I am not able to change them in runtime.
Is there a way I can change the range using variables?