@@ -2591,10 +2591,8 @@ def scroll_handler(event, canvas=None, toolbar=None):
25912591 if event .key is None : # zoom towards the mouse position
25922592 toolbar .push_current ()
25932593
2594- xmin , xmax = ax .get_xlim ()
2595- ymin , ymax = ax .get_ylim ()
2596- xmin , ymin = ax .transScale .transform ((xmin , ymin ))
2597- xmax , ymax = ax .transScale .transform ((xmax , ymax ))
2594+ (xmin , ymin ), (xmax , ymax ) = ax .transScale .transform (
2595+ [ax .get_xlim (), ax .get_ylim ()])
25982596
25992597 # mouse position in scaled (e.g., log) data coordinates
26002598 x , y = ax .transScale .transform ((event .xdata , event .ydata ))
@@ -2606,8 +2604,8 @@ def scroll_handler(event, canvas=None, toolbar=None):
26062604 new_ymax = y + (ymax - y ) * scale_factor
26072605
26082606 inv_scale = ax .transScale .inverted ()
2609- new_xmin , new_ymin = inv_scale .transform (( new_xmin , new_ymin ))
2610- new_xmax , new_ymax = inv_scale . transform ( (new_xmax , new_ymax ))
2607+ ( new_xmin , new_ymin ), ( new_xmax , new_ymax ) = inv_scale .transform (
2608+ [( new_xmin , new_ymin ), (new_xmax , new_ymax )] )
26112609
26122610 ax .set_xlim (new_xmin , new_xmax )
26132611 ax .set_ylim (new_ymin , new_ymax )
0 commit comments