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

Skip to content

Commit e033427

Browse files
committed
Use the new matplotlib deprecation warning
1 parent 2c24a7c commit e033427

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/matplotlib/axes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
import matplotlib
1111
rcParams = matplotlib.rcParams
1212

13+
from matplotlib import MatplotlibDeprecationWarning as MDeprecation
14+
1315
import matplotlib.artist as martist
1416
from matplotlib.artist import allow_rasterization
1517
import matplotlib.axis as maxis
@@ -1051,7 +1053,7 @@ def set_aspect(self, aspect, adjustable=None, anchor=None):
10511053
the option 'normal' for aspect is deprecated. Use 'auto' instead.
10521054
"""
10531055
if aspect == 'normal':
1054-
raise DeprecationWarning("Use 'auto' instead of 'normal' for "
1056+
raise MDeprecation("Use 'auto' instead of 'normal' for "
10551057
"aspect. Will be removed in 1.4.x")
10561058
self._aspect = 'auto'
10571059

0 commit comments

Comments
 (0)