|
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: |
@@ -1416,11 +1427,7 @@ def plot(self, *args, **kwargs): |
1416 | 1427 | self.cla() |
1417 | 1428 | lines = [] |
1418 | 1429 |
|
1419 | | - # Convert "c" alias to "color" immediately, to avoid |
1420 | | - # confusion farther on. |
1421 | | - c = kwargs.pop('c', None) |
1422 | | - if c is not None: |
1423 | | - kwargs['color'] = c |
| 1430 | + kwargs = cbook.normalize_kwargs(kwargs, _alias_map) |
1424 | 1431 |
|
1425 | 1432 | for line in self._get_lines(*args, **kwargs): |
1426 | 1433 | self.add_line(line) |
@@ -3172,8 +3179,8 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None, |
3172 | 3179 | ``shownotches`` is also True. Otherwise, means will be shown |
3173 | 3180 | as points. |
3174 | 3181 |
|
3175 | | - Additional Options |
3176 | | - --------------------- |
| 3182 | + Other Parameters |
| 3183 | + ---------------- |
3177 | 3184 | The following boolean options toggle the drawing of individual |
3178 | 3185 | components of the boxplots: |
3179 | 3186 | - showcaps: the caps on the ends of whiskers |
@@ -4574,6 +4581,8 @@ def fill(self, *args, **kwargs): |
4574 | 4581 | if not self._hold: |
4575 | 4582 | self.cla() |
4576 | 4583 |
|
| 4584 | + kwargs = cbook.normalize_kwargs(kwargs, _alias_map) |
| 4585 | + |
4577 | 4586 | patches = [] |
4578 | 4587 | for poly in self._get_patches_for_fill(*args, **kwargs): |
4579 | 4588 | self.add_patch(poly) |
|
0 commit comments