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

Skip to content

Commit e2e2347

Browse files
committed
a warning won't be issued for semilog axes if aspect="auto"
svn path=/trunk/matplotlib/; revision=7114
1 parent 2896b4d commit e2e2347

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lib/matplotlib/axes.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,10 +1137,11 @@ def apply_aspect(self, position=None):
11371137
aspect_scale_mode = "log"
11381138
elif (xscale == "linear" and yscale == "log") or \
11391139
(xscale == "log" and yscale == "linear"):
1140-
warnings.warn(
1141-
'aspect is not supported for Axes with xscale=%s, yscale=%s' \
1142-
% (xscale, yscale))
1143-
aspect = "auto"
1140+
if aspect is not "auto":
1141+
warnings.warn(
1142+
'aspect is not supported for Axes with xscale=%s, yscale=%s' \
1143+
% (xscale, yscale))
1144+
aspect = "auto"
11441145
else: # some custom projections have their own scales.
11451146
pass
11461147

0 commit comments

Comments
 (0)