|
18 | 18 |
|
19 | 19 | import numpy as np |
20 | 20 |
|
| 21 | +import matplotlib as mpl |
21 | 22 | from matplotlib import _api, cbook, _docstring, _preprocess_data |
22 | 23 | import matplotlib.artist as martist |
23 | 24 | import matplotlib.axes as maxes |
|
28 | 29 | import matplotlib.patches as mpatches |
29 | 30 | import matplotlib.container as mcontainer |
30 | 31 | import matplotlib.transforms as mtransforms |
31 | | -from matplotlib.axes import Axes, rcParams |
| 32 | +from matplotlib.axes import Axes |
32 | 33 | from matplotlib.axes._base import _axis_method_wrapper, _process_plot_format |
33 | 34 | from matplotlib.transforms import Bbox |
34 | 35 | from matplotlib.tri.triangulation import Triangulation |
@@ -964,10 +965,10 @@ def clear(self): |
964 | 965 | # docstring inherited. |
965 | 966 | super().clear() |
966 | 967 | if self._focal_length == np.inf: |
967 | | - self._zmargin = rcParams['axes.zmargin'] |
| 968 | + self._zmargin = mpl.rcParams['axes.zmargin'] |
968 | 969 | else: |
969 | 970 | self._zmargin = 0. |
970 | | - self.grid(rcParams['axes3d.grid']) |
| 971 | + self.grid(mpl.rcParams['axes3d.grid']) |
971 | 972 |
|
972 | 973 | def _button_press(self, event): |
973 | 974 | if event.inaxes == self: |
@@ -1394,7 +1395,7 @@ def plot_surface(self, X, Y, Z, *, norm=None, vmin=None, |
1394 | 1395 | rcount = kwargs.pop('rcount', 50) |
1395 | 1396 | ccount = kwargs.pop('ccount', 50) |
1396 | 1397 |
|
1397 | | - if rcParams['_internal.classic_mode']: |
| 1398 | + if mpl.rcParams['_internal.classic_mode']: |
1398 | 1399 | # Strides have priority over counts in classic mode. |
1399 | 1400 | # So, only compute strides from counts |
1400 | 1401 | # if counts were explicitly given |
@@ -1640,7 +1641,7 @@ def plot_wireframe(self, X, Y, Z, **kwargs): |
1640 | 1641 | rcount = kwargs.pop('rcount', 50) |
1641 | 1642 | ccount = kwargs.pop('ccount', 50) |
1642 | 1643 |
|
1643 | | - if rcParams['_internal.classic_mode']: |
| 1644 | + if mpl.rcParams['_internal.classic_mode']: |
1644 | 1645 | # Strides have priority over counts in classic mode. |
1645 | 1646 | # So, only compute strides from counts |
1646 | 1647 | # if counts were explicitly given |
@@ -2965,7 +2966,7 @@ def errorbar(self, x, y, z, zerr=None, yerr=None, xerr=None, fmt='', |
2965 | 2966 | # Make the style dict for caps (the "hats"). |
2966 | 2967 | eb_cap_style = {**base_style, 'linestyle': 'None'} |
2967 | 2968 | if capsize is None: |
2968 | | - capsize = rcParams["errorbar.capsize"] |
| 2969 | + capsize = mpl.rcParams["errorbar.capsize"] |
2969 | 2970 | if capsize > 0: |
2970 | 2971 | eb_cap_style['markersize'] = 2. * capsize |
2971 | 2972 | if capthick is not None: |
@@ -3006,7 +3007,7 @@ def _extract_errs(err, data, lomask, himask): |
3006 | 3007 | # scene is rotated, they are given a standard size based on viewing |
3007 | 3008 | # them directly in planar form. |
3008 | 3009 | quiversize = eb_cap_style.get('markersize', |
3009 | | - rcParams['lines.markersize']) ** 2 |
| 3010 | + mpl.rcParams['lines.markersize']) ** 2 |
3010 | 3011 | quiversize *= self.figure.dpi / 72 |
3011 | 3012 | quiversize = self.transAxes.inverted().transform([ |
3012 | 3013 | (0, 0), (quiversize, quiversize)]) |
@@ -3221,7 +3222,7 @@ def stem(self, x, y, z, *, linefmt='C0-', markerfmt='C0o', basefmt='C3-', |
3221 | 3222 | # Determine style for stem lines. |
3222 | 3223 | linestyle, linemarker, linecolor = _process_plot_format(linefmt) |
3223 | 3224 | if linestyle is None: |
3224 | | - linestyle = rcParams['lines.linestyle'] |
| 3225 | + linestyle = mpl.rcParams['lines.linestyle'] |
3225 | 3226 |
|
3226 | 3227 | # Plot everything in required order. |
3227 | 3228 | baseline, = self.plot(basex, basey, basefmt, zs=bottom, |
|
0 commit comments