|
66 | 66 | Whether *x* axis labels, *y* axis labels, axis formatters, axes titles,
|
67 | 67 | colorbar labels, and legend labels are automatically configured when
|
68 | 68 | a `~pandas.Series`, `~pandas.DataFrame` or `~xarray.DataArray` is passed
|
69 |
| - to the plotting command. Default is the figure-wide |
70 |
| - `proplot.figure.Figure.autoformat` setting. |
| 69 | + to the plotting command. Default is :rc:`autoformat`. |
71 | 70 | """
|
72 | 71 |
|
73 | 72 | docstring.snippets['axes.cmap_changer'] = """
|
@@ -458,7 +457,6 @@ def standardize_1d(self, func, *args, autoformat=None, **kwargs):
|
458 | 457 | # Sanitize input
|
459 | 458 | # TODO: Add exceptions for methods other than 'hist'?
|
460 | 459 | name = func.__name__
|
461 |
| - autoformat = _not_none(autoformat, self.figure._auto_format) |
462 | 460 | _load_objects()
|
463 | 461 | if not args:
|
464 | 462 | return func(self, *args, **kwargs)
|
@@ -554,7 +552,8 @@ def standardize_1d(self, func, *args, autoformat=None, **kwargs):
|
554 | 552 |
|
555 | 553 | # WARNING: For some functions, e.g. boxplot and violinplot, we *require*
|
556 | 554 | # cycle_changer is also applied so it can strip 'x' input.
|
557 |
| - with _state_context(self, _auto_format=autoformat): |
| 555 | + autoformat = _not_none(autoformat, rc['autoformat']) |
| 556 | + with rc.context(autoformat=autoformat): |
558 | 557 | return func(self, x, *ys, *args, **kwargs)
|
559 | 558 |
|
560 | 559 |
|
@@ -679,7 +678,6 @@ def standardize_2d(
|
679 | 678 | """
|
680 | 679 | # Sanitize input
|
681 | 680 | name = func.__name__
|
682 |
| - autoformat = _not_none(autoformat, self.figure._auto_format) |
683 | 681 | _load_objects()
|
684 | 682 | if not args:
|
685 | 683 | return func(self, *args, **kwargs)
|
@@ -933,7 +931,8 @@ def standardize_2d(
|
933 | 931 | kwargs['latlon'] = False
|
934 | 932 |
|
935 | 933 | # Finally return result
|
936 |
| - with _state_context(self, _auto_format=autoformat): |
| 934 | + autoformat = _not_none(autoformat, rc['autoformat']) |
| 935 | + with rc.context(autoformat=autoformat): |
937 | 936 | return func(self, x, y, *Zs, **kwargs)
|
938 | 937 |
|
939 | 938 |
|
@@ -1100,20 +1099,22 @@ def indicate_error(
|
1100 | 1099 | calculated automatically).
|
1101 | 1100 | boxstds, boxpctiles, boxdata : optional
|
1102 | 1101 | As with `barstds`, `barpctiles`, and `bardata`, but for *thicker error bars*
|
1103 |
| - representing a smaller interval than thick error bars. If `boxstds` is |
| 1102 | + representing a smaller interval than the thin error bars. If `boxstds` is |
1104 | 1103 | ``True``, the default standard deviation multiples ``(-1, 1)`` are used.
|
1105 | 1104 | If `boxpctiles` is ``True``, the default percentile multiples ``(25, 75)``
|
1106 |
| - (i.e. the interquartile range) are used. When boxes and bars are combined, this |
| 1105 | + are used (i.e. the interquartile range). When boxes and bars are combined, this |
1107 | 1106 | has the effect of drawing miniature box-and-whisker plots.
|
1108 | 1107 | shadestds, shadepctiles, shadedata : optional
|
1109 | 1108 | As with `barstds`, `barpctiles`, and `bardata`, but using *shading* to indicate
|
1110 | 1109 | the error range. If `shadestds` is ``True``, the default standard deviation
|
1111 | 1110 | multiples ``(-2, 2)`` are used. If `shadepctiles` is ``True``, the default
|
1112 |
| - percentile multiples ``(5, 95)`` are used. Shading is generally useful for |
| 1111 | + percentile multiples ``(10, 90)`` are used. Shading is generally useful for |
1113 | 1112 | `~matplotlib.axes.Axes.plot` plots and not `~matplotlib.axes.Axes.bar` plots.
|
1114 | 1113 | fadestds, fadepctiles, fadedata : optional
|
1115 | 1114 | As with `shadestds`, `shadepctiles`, and `shadedata`, but for an additional,
|
1116 |
| - more faded, *secondary* shaded region. |
| 1115 | + more faded, *secondary* shaded region. If `fadestds` is ``True``, the default |
| 1116 | + standard deviation multiples ``(-3, 3)`` are used. If `fadepctiles` is ``True``, |
| 1117 | + the default percentile multiples ``(0, 100)`` are used. |
1117 | 1118 | barcolor, boxcolor, shadecolor, fadecolor : color-spec, optional
|
1118 | 1119 | Colors for the different error indicators. For error bars, the default is
|
1119 | 1120 | ``'k'``. For shading, the default behavior is to inherit color from the
|
@@ -2255,7 +2256,7 @@ def cycle_changer(
|
2255 | 2256 | # NOTE: Requires standardize_1d wrapper before reaching this. Also note
|
2256 | 2257 | # that the 'x' coordinates are sometimes ignored below.
|
2257 | 2258 | name = func.__name__
|
2258 |
| - autoformat = self._auto_format # possibly manipulated by standardize_[12]d |
| 2259 | + autoformat = rc['autoformat'] # possibly manipulated by standardize_[12]d |
2259 | 2260 | if not args:
|
2260 | 2261 | return func(self, *args, **kwargs)
|
2261 | 2262 | x, y, *args = args
|
@@ -2846,7 +2847,7 @@ def cmap_changer(
|
2846 | 2847 | of the color selections.
|
2847 | 2848 | """
|
2848 | 2849 | name = func.__name__
|
2849 |
| - autoformat = self._auto_format # possibly manipulated by standardize_[12]d |
| 2850 | + autoformat = rc['autoformat'] # possibly manipulated by standardize_[12]d |
2850 | 2851 | if not args:
|
2851 | 2852 | return func(self, *args, **kwargs)
|
2852 | 2853 |
|
|
0 commit comments