|
45 | 45 |
|
46 | 46 | rcParams = matplotlib.rcParams |
47 | 47 |
|
| 48 | +_alias_map = {'color': ['c'], |
| 49 | + 'linewidth': ['lw'], |
| 50 | + 'linestyle': ['ls'], |
| 51 | + 'facecolor': ['fc'], |
| 52 | + 'edgecolor': ['ec'], |
| 53 | + 'markerfacecolor': ['mfc'], |
| 54 | + 'markeredgecolor': ['mec'], |
| 55 | + 'markeredgewidth': ['mew'], |
| 56 | + 'markersize': ['ms'], |
| 57 | + } |
| 58 | + |
48 | 59 |
|
49 | 60 | def _plot_args_replacer(args, data): |
50 | 61 | if len(args) == 1: |
@@ -1417,11 +1428,7 @@ def plot(self, *args, **kwargs): |
1417 | 1428 | self.cla() |
1418 | 1429 | lines = [] |
1419 | 1430 |
|
1420 | | - # Convert "c" alias to "color" immediately, to avoid |
1421 | | - # confusion farther on. |
1422 | | - c = kwargs.pop('c', None) |
1423 | | - if c is not None: |
1424 | | - kwargs['color'] = c |
| 1431 | + kwargs = cbook.normalize_kwargs(kwargs, _alias_map) |
1425 | 1432 |
|
1426 | 1433 | for line in self._get_lines(*args, **kwargs): |
1427 | 1434 | self.add_line(line) |
@@ -3173,8 +3180,8 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, |
3173 | 3180 | ``shownotches`` is also True. Otherwise, means will be shown |
3174 | 3181 | as points. |
3175 | 3182 |
|
3176 | | - Additional Options |
3177 | | - --------------------- |
| 3183 | + Other Parameters |
| 3184 | + ---------------- |
3178 | 3185 | The following boolean options toggle the drawing of individual |
3179 | 3186 | components of the boxplots: |
3180 | 3187 | - showcaps: the caps on the ends of whiskers |
@@ -4575,6 +4582,8 @@ def fill(self, *args, **kwargs): |
4575 | 4582 | if not self._hold: |
4576 | 4583 | self.cla() |
4577 | 4584 |
|
| 4585 | + kwargs = cbook.normalize_kwargs(kwargs, _alias_map) |
| 4586 | + |
4578 | 4587 | patches = [] |
4579 | 4588 | for poly in self._get_patches_for_fill(*args, **kwargs): |
4580 | 4589 | self.add_patch(poly) |
|
0 commit comments