@@ -217,54 +217,6 @@ class Colorbar:
217217 A list of `.LineCollection` (empty if no lines were drawn).
218218 dividers : `.LineCollection`
219219 A LineCollection (empty if *drawedges* is ``False``).
220-
221- Parameters
222- ----------
223- ax : `~matplotlib.axes.Axes`
224- The `~.axes.Axes` instance in which the colorbar is drawn.
225-
226- mappable : `.ScalarMappable`
227- The mappable whose colormap and norm will be used.
228-
229- To show the colors versus index instead of on a 0-1 scale, set the
230- mappable's norm to ``colors.NoNorm()``.
231-
232- alpha : float
233- The colorbar transparency between 0 (transparent) and 1 (opaque).
234-
235- location : None or {'left', 'right', 'top', 'bottom'}
236- Set the colorbar's *orientation* and *ticklocation*. Colorbars on
237- the left and right are vertical, colorbars at the top and bottom
238- are horizontal. The *ticklocation* is the same as *location*, so if
239- *location* is 'top', the ticks are on the top. *orientation* and/or
240- *ticklocation* can be provided as well and overrides the value set by
241- *location*, but there will be an error for incompatible combinations.
242-
243- .. versionadded:: 3.7
244-
245- %(_colormap_kw_doc)s
246-
247- Other Parameters
248- ----------------
249- cmap : `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
250- The colormap to use. This parameter is ignored, unless *mappable* is
251- None.
252-
253- norm : `~matplotlib.colors.Normalize`
254- The normalization to use. This parameter is ignored, unless *mappable*
255- is None.
256-
257- orientation : None or {'vertical', 'horizontal'}
258- If None, use the value determined by *location*. If both
259- *orientation* and *location* are None then defaults to 'vertical'.
260-
261- ticklocation : {'auto', 'left', 'right', 'top', 'bottom'}
262- The location of the colorbar ticks. The *ticklocation* must match
263- *orientation*. For example, a horizontal colorbar can only have ticks
264- at the top or the bottom. If 'auto', the ticks will be the same as
265- *location*, so a colorbar to the left will have ticks to the left. If
266- *location* is None, the ticks will be at the bottom for a horizontal
267- colorbar and at the right for a vertical.
268220 """
269221
270222 n_rasterize = 50 # rasterize solids if number of colors >= n_rasterize
@@ -286,7 +238,55 @@ def __init__(
286238 cmap = None , norm = None , # redundant with *mappable*
287239 orientation = None , ticklocation = 'auto' , # redundant with *location*
288240 ):
289-
241+ """
242+ Parameters
243+ ----------
244+ ax : `~matplotlib.axes.Axes`
245+ The `~.axes.Axes` instance in which the colorbar is drawn.
246+
247+ mappable : `.ScalarMappable`
248+ The mappable whose colormap and norm will be used.
249+
250+ To show the colors versus index instead of on a 0-1 scale, set the
251+ mappable's norm to ``colors.NoNorm()``.
252+
253+ alpha : float
254+ The colorbar transparency between 0 (transparent) and 1 (opaque).
255+
256+ location : None or {'left', 'right', 'top', 'bottom'}
257+ Set the colorbar's *orientation* and *ticklocation*. Colorbars on
258+ the left and right are vertical, colorbars at the top and bottom
259+ are horizontal. The *ticklocation* is the same as *location*, so if
260+ *location* is 'top', the ticks are on the top. *orientation* and/or
261+ *ticklocation* can be provided as well and overrides the value set by
262+ *location*, but there will be an error for incompatible combinations.
263+
264+ .. versionadded:: 3.7
265+
266+ %(_colormap_kw_doc)s
267+
268+ Other Parameters
269+ ----------------
270+ cmap : `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
271+ The colormap to use. This parameter is ignored, unless *mappable* is
272+ None.
273+
274+ norm : `~matplotlib.colors.Normalize`
275+ The normalization to use. This parameter is ignored, unless *mappable*
276+ is None.
277+
278+ orientation : None or {'vertical', 'horizontal'}
279+ If None, use the value determined by *location*. If both
280+ *orientation* and *location* are None then defaults to 'vertical'.
281+
282+ ticklocation : {'auto', 'left', 'right', 'top', 'bottom'}
283+ The location of the colorbar ticks. The *ticklocation* must match
284+ *orientation*. For example, a horizontal colorbar can only have ticks
285+ at the top or the bottom. If 'auto', the ticks will be the same as
286+ *location*, so a colorbar to the left will have ticks to the left. If
287+ *location* is None, the ticks will be at the bottom for a horizontal
288+ colorbar and at the right for a vertical.
289+ """
290290 if mappable is None :
291291 mappable = cm .ScalarMappable (norm = norm , cmap = cmap )
292292
0 commit comments