Skip to content

Commit 7c6c330

Browse files
committed
Fixed another plotpy V1 regression (thx to guiqwt)
Fixes aspect ratio zoom issue when resizing plot widget
1 parent 883f2d2 commit 7c6c330

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

plotpy/plot/base.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,11 +2209,7 @@ def apply_aspect_ratio(self, full_scale: bool = False) -> None:
22092209
dy2 = (h * dx1) / (w * self.__aspect_ratio)
22102210
dx2 = (w * dy1 * self.__aspect_ratio) / h
22112211

2212-
fix_yaxis = False
2213-
if dy2 > dy1:
2214-
fix_yaxis = True
2215-
elif full_scale:
2216-
fix_yaxis = True
2212+
fix_yaxis = not full_scale or dy2 > dy1
22172213

22182214
if fix_yaxis:
22192215
delta_y = 0.5 * (dy2 - dy1)

0 commit comments

Comments
 (0)