Autoscale Y axis on Cursor Zoom

Hey everyone. I have a line graph that has such a long period of data that when you zoom into a small portion of the graph, it typically just looks like a straight line because the changes of the graph within a month are nothing compared to the scale over the course of decades. I would like the graphโ€™s y axis to rescale in such a way that you should only be selecting a region of the x axis to zoom in, but the y-axis should dynamically rescale whenever the user chooses a new region, rather than recycling the initial scale of the graph. I found a similar topic in the Javascript forum that seemed to solve this with event listeners (?) but Iโ€™m not sure how to solve this in Python. Any help is much appreciated :smiley: