Hello. There is such a schedule:
I need to understand how the argument in the slider works in order to try to customize the code for myself. In this particular case, I need to implement scaling on the slider. So that the distance between the points along the Y axis would be either huge or everything would merge into one point. I managed to achieve this - but it all happens in 2 steps for some reason. And I need to understand why. I would like it to happen smoothly and scaling so that you can adjust it a little differently .. (extreme limits) I just did not try it already - nothing works correctly in the mind. )
Question: how can this be implemented with the slider? I need the scaling to occur by 2 values (the highest point and the lowest)
PS Skeleton of incorrectly working code, so far it looks like this for me:
aycolor = 'blue' ax_y_pos = plt.axes([0.086, 0.894, 0.828, 0.022], axisbg=aycolor) y_pos = Slider(ax_y_pos, '', 0, 1, valfmt='%d', valinit=max_value(self.high) + (max_value(self.high) * 0.0022), color='green') y_pos.valtext.set_visible(False) def update(val): pos = int(y_pos.val) ax.set_ylim(min_value(self.low), max_value(self.high)) fig.canvas.draw_idle() cid = y_pos.on_changed(update) ax.set_ylim(min_value(self.low) - (min_value(self.low) * 0.0022), max_value(self.high) + (max_value(self.high) * 0.0022)) I would appreciate any help ..