Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 655f5ae

Browse files
committed
Fix typo in margins handling.
This does not change the semantics of the code but should make things clearer and offer a negligible optimization: previously, the margins correction would be computed even if `margin == 0` as long as `do_upper_margin` was set.
1 parent 0ac187d commit 655f5ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2250,7 +2250,7 @@ def handle_single_axis(scale, autoscaleon, shared_axes, interval,
22502250
x0, x1 = mtransforms.nonsingular(
22512251
x0, x1, increasing=False, expander=0.05)
22522252

2253-
if (margin > 0 and do_lower_margin or do_upper_margin):
2253+
if margin > 0 and (do_lower_margin or do_upper_margin):
22542254
if axis.get_scale() == 'linear':
22552255
delta = (x1 - x0) * margin
22562256
if do_lower_margin:

0 commit comments

Comments
 (0)