|
84 | 84 | axes' anchor will be unchanged. |
85 | 85 | Defaults to (1.0, 0.5) if vertical; (0.5, 0.0) if horizontal. |
86 | 86 | """ |
87 | | -make_axes_kw_doc = _make_axes_param_doc + _make_axes_other_param_doc |
88 | 87 |
|
89 | | -colormap_kw_doc = """ |
| 88 | +_colormap_kw_doc = """ |
90 | 89 |
|
91 | 90 | ============ ==================================================== |
92 | 91 | Property Description |
|
149 | 148 |
|
150 | 149 | """ |
151 | 150 |
|
152 | | -colorbar_doc = """ |
153 | | -
|
| 151 | +docstring.interpd.update(colorbar_doc=""" |
154 | 152 | Add a colorbar to a plot. |
155 | 153 |
|
156 | | -Function signatures for the :mod:`~matplotlib.pyplot` interface; all |
157 | | -but the first are also method signatures for the `~.Figure.colorbar` method:: |
158 | | -
|
159 | | - colorbar(**kwargs) |
160 | | - colorbar(mappable, **kwargs) |
161 | | - colorbar(mappable, cax=cax, **kwargs) |
162 | | - colorbar(mappable, ax=ax, **kwargs) |
163 | | -
|
164 | 154 | Parameters |
165 | 155 | ---------- |
166 | 156 | mappable |
|
179 | 169 | Axes into which the colorbar will be drawn. |
180 | 170 |
|
181 | 171 | ax : `~matplotlib.axes.Axes`, list of Axes, optional |
182 | | - Parent axes from which space for a new colorbar axes will be stolen. |
183 | | - If a list of axes is given they will all be resized to make room for the |
184 | | - colorbar axes. |
| 172 | + One or more parent axes from which space for a new colorbar axes will be |
| 173 | + stolen, if *cax* is None. This has no effect if *cax* is set. |
185 | 174 |
|
186 | 175 | use_gridspec : bool, optional |
187 | 176 | If *cax* is ``None``, a new *cax* is created as an instance of Axes. If |
|
198 | 187 | Additional keyword arguments are of two kinds: |
199 | 188 |
|
200 | 189 | axes properties: |
| 190 | +%s |
201 | 191 | %s |
202 | 192 | colorbar properties: |
203 | 193 | %s |
|
225 | 215 | However this has negative consequences in other circumstances, e.g. with |
226 | 216 | semi-transparent images (alpha < 1) and colorbar extensions; therefore, this |
227 | 217 | workaround is not used by default (see issue #1188). |
| 218 | +""" % (_make_axes_param_doc, _make_axes_other_param_doc, _colormap_kw_doc)) |
228 | 219 |
|
229 | | -""" % (make_axes_kw_doc, colormap_kw_doc) |
230 | | - |
231 | | -docstring.interpd.update(colorbar_doc=colorbar_doc) |
| 220 | +# Deprecated since 3.4. |
| 221 | +colorbar_doc = docstring.interpd.params["colorbar_doc"] |
| 222 | +colormap_kw_doc = _colormap_kw_doc |
| 223 | +make_axes_kw_doc = _make_axes_param_doc + _make_axes_other_param_doc |
232 | 224 |
|
233 | 225 |
|
234 | 226 | def _set_ticks_on_axis_warn(*args, **kw): |
|
0 commit comments