Skip to content

Commit d66aced

Browse files
committed
Use :mpltype:color for color types
1 parent 810a43b commit d66aced

21 files changed

+80
-80
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,10 @@ def indicate_inset(self, bounds, inset_ax=None, *, transform=None,
427427
`ax.transAxes`, i.e. the units of *rect* are in Axes-relative
428428
coordinates.
429429
430-
facecolor : color, default: 'none'
430+
facecolor : :mpltype:`color`, default: 'none'
431431
Facecolor of the rectangle.
432432
433-
edgecolor : color, default: '0.5'
433+
edgecolor : :mpltype:`color`, default: '0.5'
434434
Color of the rectangle and color of the connecting lines.
435435
436436
alpha : float, default: 0.5
@@ -1073,7 +1073,7 @@ def hlines(self, y, xmin, xmax, colors=None, linestyles='solid',
10731073
Respective beginning and end of each line. If scalars are
10741074
provided, all lines will have the same length.
10751075
1076-
colors : color or list of colors, default: :rc:`lines.color`
1076+
colors : :mpltype:`color` or list of colors, default: :rc:`lines.color`
10771077
10781078
linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, default: 'solid'
10791079
@@ -1164,7 +1164,7 @@ def vlines(self, x, ymin, ymax, colors=None, linestyles='solid',
11641164
Respective beginning and end of each line. If scalars are
11651165
provided, all lines will have the same length.
11661166
1167-
colors : color or list of colors, default: :rc:`lines.color`
1167+
colors : :mpltype:`color` or list of colors, default: :rc:`lines.color`
11681168
11691169
linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, default: 'solid'
11701170
@@ -1300,7 +1300,7 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
13001300
If *positions* is 2D, this can be a sequence with length matching
13011301
the length of *positions*.
13021302
1303-
colors : color or list of colors, default: :rc:`lines.color`
1303+
colors : :mpltype:`color` or list of colors, default: :rc:`lines.color`
13041304
The color(s) of the event lines.
13051305
13061306
If *positions* is 2D, this can be a sequence with length matching
@@ -2333,10 +2333,10 @@ def bar(self, x, height, width=0.8, bottom=None, *, align="center",
23332333
23342334
Other Parameters
23352335
----------------
2336-
color : color or list of color, optional
2336+
color : :mpltype:`color` or list of color, optional
23372337
The colors of the bar faces.
23382338
2339-
edgecolor : color or list of color, optional
2339+
edgecolor : :mpltype:`color` or list of color, optional
23402340
The colors of the bar edges.
23412341
23422342
linewidth : float or array-like, optional
@@ -2368,7 +2368,7 @@ def bar(self, x, height, width=0.8, bottom=None, *, align="center",
23682368
See :doc:`/gallery/statistics/errorbar_features` for an example on
23692369
the usage of *xerr* and *yerr*.
23702370
2371-
ecolor : color or list of color, default: 'black'
2371+
ecolor : :mpltype:`color` or list of color, default: 'black'
23722372
The line color of the errorbars.
23732373
23742374
capsize : float, default: :rc:`errorbar.capsize`
@@ -2646,10 +2646,10 @@ def barh(self, y, width, height=0.8, left=None, *, align="center",
26462646
26472647
Other Parameters
26482648
----------------
2649-
color : color or list of color, optional
2649+
color : :mpltype:`color` or list of color, optional
26502650
The colors of the bar faces.
26512651
2652-
edgecolor : color or list of color, optional
2652+
edgecolor : :mpltype:`color` or list of color, optional
26532653
The colors of the bar edges.
26542654
26552655
linewidth : float or array-like, optional
@@ -2681,7 +2681,7 @@ def barh(self, y, width, height=0.8, left=None, *, align="center",
26812681
See :doc:`/gallery/statistics/errorbar_features` for an example on
26822682
the usage of *xerr* and *yerr*.
26832683
2684-
ecolor : color or list of color, default: 'black'
2684+
ecolor : :mpltype:`color` or list of color, default: 'black'
26852685
The line color of the errorbars.
26862686
26872687
capsize : float, default: :rc:`errorbar.capsize`
@@ -3139,7 +3139,7 @@ def pie(self, x, explode=None, labels=None, colors=None,
31393139
labels : list, default: None
31403140
A sequence of strings providing the labels for each wedge
31413141
3142-
colors : color or array-like of color, default: None
3142+
colors : :mpltype:`color` or array-like of color, default: None
31433143
A sequence of colors through which the pie chart will cycle. If
31443144
*None*, will use the colors in the currently active cycle.
31453145
@@ -3434,7 +3434,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
34343434
Use 'none' (case-insensitive) to plot errorbars without any data
34353435
markers.
34363436
3437-
ecolor : color, default: None
3437+
ecolor : :mpltype:`color`, default: None
34383438
The color of the errorbar lines. If None, use the color of the
34393439
line connecting the markers.
34403440
@@ -4402,9 +4402,9 @@ def _parse_scatter_color_args(c, edgecolors, kwargs, xsize,
44024402
44034403
Parameters
44044404
----------
4405-
c : color or sequence or sequence of color or None
4405+
c : :mpltype:`color` or sequence or sequence of color or None
44064406
See argument description of `.Axes.scatter`.
4407-
edgecolors : color or sequence of color or {'face', 'none'} or None
4407+
edgecolors : :mpltype:`color` or sequence of color or {'face', 'none'} or None
44084408
See argument description of `.Axes.scatter`.
44094409
kwargs : dict
44104410
Additional kwargs. If these keys exist, we pop and process them:
@@ -6724,7 +6724,7 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
67246724
log : bool, default: False
67256725
If ``True``, the histogram axis will be set to a log scale.
67266726
6727-
color : color or array-like of colors or None, default: None
6727+
color : :mpltype:`color` or array-like of colors or None, default: None
67286728
Color or sequence of colors, one per dataset. Default (``None``)
67296729
uses the standard line color sequence.
67306730

lib/matplotlib/axes/_base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,7 @@ def set_facecolor(self, color):
15071507
15081508
Parameters
15091509
----------
1510-
color : color; see :ref:`colors_def`
1510+
color : :mpltype:`color`
15111511
"""
15121512
self._facecolor = color
15131513
self.stale = True
@@ -3379,17 +3379,17 @@ def tick_params(self, axis='both', **kwargs):
33793379
Tick length in points.
33803380
width : float
33813381
Tick width in points.
3382-
color : color
3382+
color : :mpltype:`color`
33833383
Tick color.
33843384
pad : float
33853385
Distance in points between tick and label.
33863386
labelsize : float or str
33873387
Tick label font size in points or as a string (e.g., 'large').
3388-
labelcolor : color
3388+
labelcolor : :mpltype:`color`
33893389
Tick label color.
33903390
labelfontfamily : str
33913391
Tick label font.
3392-
colors : color
3392+
colors : :mpltype:`color`
33933393
Tick color and label color.
33943394
zorder : float
33953395
Tick and label zorder.
@@ -3399,7 +3399,7 @@ def tick_params(self, axis='both', **kwargs):
33993399
Whether to draw the respective tick labels.
34003400
labelrotation : float
34013401
Tick label rotation
3402-
grid_color : color
3402+
grid_color : :mpltype:`color`
34033403
Gridline color.
34043404
grid_alpha : float
34053405
Transparency of gridlines: 0 (transparent) to 1 (opaque).

lib/matplotlib/axes/_secondary_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def set_color(self, color):
240240
241241
Parameters
242242
----------
243-
color : color; see :ref:`colors_def`
243+
color : :mpltype:`color`
244244
"""
245245
axis = self._axis_map[self._orientation]
246246
axis.set_tick_params(colors=color)

lib/matplotlib/backend_bases.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def draw_markers(self, gc, marker_path, marker_trans, path,
218218
The locations to draw the markers.
219219
trans : `~matplotlib.transforms.Transform`
220220
An affine transform applied to the path.
221-
rgbFace : color, optional
221+
rgbFace : :mpltype:`color`, optional
222222
"""
223223
for vertices, codes in path.iter_segments(trans, simplify=False):
224224
if len(vertices):
@@ -956,7 +956,7 @@ def set_foreground(self, fg, isRGBA=False):
956956
957957
Parameters
958958
----------
959-
fg : color
959+
fg : :mpltype:`color`
960960
isRGBA : bool
961961
If *fg* is known to be an ``(r, g, b, a)`` tuple, *isRGBA* can be
962962
set to True to improve performance.
@@ -2111,11 +2111,11 @@ def print_figure(
21112111
dpi : float, default: :rc:`savefig.dpi`
21122112
The dots per inch to save the figure in.
21132113
2114-
facecolor : color or 'auto', default: :rc:`savefig.facecolor`
2114+
facecolor : :mpltype:`color` or 'auto', default: :rc:`savefig.facecolor`
21152115
The facecolor of the figure. If 'auto', use the current figure
21162116
facecolor.
21172117
2118-
edgecolor : color or 'auto', default: :rc:`savefig.edgecolor`
2118+
edgecolor : :mpltype:`color` or 'auto', default: :rc:`savefig.edgecolor`
21192119
The edgecolor of the figure. If 'auto', use the current figure
21202120
edgecolor.
21212121

lib/matplotlib/collections.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ def __init__(self, *,
9696
"""
9797
Parameters
9898
----------
99-
edgecolors : color or list of colors, default: :rc:`patch.edgecolor`
99+
edgecolors : :mpltype:`color` or list of colors, default: :rc:`patch.edgecolor`
100100
Edge color for each patch making up the collection. The special
101101
value 'face' can be passed to make the edgecolor match the
102102
facecolor.
103-
facecolors : color or list of colors, default: :rc:`patch.facecolor`
103+
facecolors : :mpltype:`color` or list of colors, default: :rc:`patch.facecolor`
104104
Face color for each patch making up the collection.
105105
linewidths : float or list of floats, default: :rc:`patch.linewidth`
106106
Line width for each patch making up the collection.
@@ -745,7 +745,7 @@ def set_color(self, c):
745745
746746
Parameters
747747
----------
748-
c : color or list of RGBA tuples
748+
c : :mpltype:`color` or list of RGBA tuples
749749
750750
See Also
751751
--------
@@ -776,7 +776,7 @@ def set_facecolor(self, c):
776776
777777
Parameters
778778
----------
779-
c : color or list of colors
779+
c : :mpltype:`color` or list of colors
780780
"""
781781
if isinstance(c, str) and c.lower() in ("none", "face"):
782782
c = c.lower()
@@ -821,7 +821,7 @@ def set_edgecolor(self, c):
821821
822822
Parameters
823823
----------
824-
c : color or list of colors or 'face'
824+
c : :mpltype:`color` or list of colors or 'face'
825825
The collection edgecolor(s). If a sequence, the patches cycle
826826
through it. If 'face', match the facecolor.
827827
"""
@@ -1368,15 +1368,15 @@ def __init__(self, segments, # Can be None.
13681368
can have a different number of segments.
13691369
linewidths : float or list of float, default: :rc:`lines.linewidth`
13701370
The width of each line in points.
1371-
colors : color or list of color, default: :rc:`lines.color`
1371+
colors : :mpltype:`color` or list of color, default: :rc:`lines.color`
13721372
A sequence of RGBA tuples (e.g., arbitrary color strings, etc, not
13731373
allowed).
13741374
antialiaseds : bool or list of bool, default: :rc:`lines.antialiased`
13751375
Whether to use antialiasing for each line.
13761376
zorder : float, default: 2
13771377
zorder of the lines once drawn.
13781378
1379-
facecolors : color or list of color, default: 'none'
1379+
facecolors : :mpltype:`color` or list of color, default: 'none'
13801380
When setting *facecolors*, each line is interpreted as a boundary
13811381
for an area, implicitly closing the path from the last point to the
13821382
first point. The enclosed area is filled with *facecolor*.
@@ -1455,7 +1455,7 @@ def set_color(self, c):
14551455
14561456
Parameters
14571457
----------
1458-
c : color or list of colors
1458+
c : :mpltype:`color` or list of colors
14591459
Single color (all lines have same color), or a
14601460
sequence of RGBA tuples; if it is a sequence the lines will
14611461
cycle through the sequence.
@@ -1483,7 +1483,7 @@ def set_gapcolor(self, gapcolor):
14831483
14841484
Parameters
14851485
----------
1486-
gapcolor : color or list of colors or None
1486+
gapcolor : :mpltype:`color` or list of colors or None
14871487
The color with which to fill the gaps. If None, the gaps are
14881488
unfilled.
14891489
"""
@@ -1556,7 +1556,7 @@ def __init__(self,
15561556
``lineoffset - linelength/2`` to ``lineoffset + linelength/2``).
15571557
linewidth : float or list thereof, default: :rc:`lines.linewidth`
15581558
The line width of the event lines, in points.
1559-
color : color or list of colors, default: :rc:`lines.color`
1559+
color : :mpltype:`color` or list of colors, default: :rc:`lines.color`
15601560
The color of the event lines.
15611561
linestyle : str or tuple or list thereof, default: 'solid'
15621562
Valid strings are ['solid', 'dashed', 'dashdot', 'dotted',

lib/matplotlib/colorbar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ def add_lines(self, *args, **kwargs):
730730
----------
731731
levels : array-like
732732
The positions of the lines.
733-
colors : color or list of colors
733+
colors : :mpltype:`color` or list of colors
734734
Either a single color applying to all lines or one color value for
735735
each line.
736736
linewidths : float or array-like

lib/matplotlib/contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def clabel(self, levels=None, *,
7878
Size in points or relative size e.g., 'smaller', 'x-large'.
7979
See `.Text.set_size` for accepted string values.
8080
81-
colors : color or colors or None, default: None
81+
colors : :mpltype:`color` or colors or None, default: None
8282
The label colors:
8383
8484
- If *None*, the color of each label matches the color of

lib/matplotlib/figure.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ def set_edgecolor(self, color):
397397
398398
Parameters
399399
----------
400-
color : color; see :ref:`colors_def`
400+
color : :mpltype:`color`
401401
"""
402402
self.patch.set_edgecolor(color)
403403

@@ -407,7 +407,7 @@ def set_facecolor(self, color):
407407
408408
Parameters
409409
----------
410-
color : color; see :ref:`colors_def`
410+
color : :mpltype:`color`
411411
"""
412412
self.patch.set_facecolor(color)
413413

@@ -3261,11 +3261,11 @@ def savefig(self, fname, *, transparent=None, **kwargs):
32613261
compressed layout engine; ignored if one of those engines is not in
32623262
use.
32633263
3264-
facecolor : color or 'auto', default: :rc:`savefig.facecolor`
3264+
facecolor : :mpltype:`color` or 'auto', default: :rc:`savefig.facecolor`
32653265
The facecolor of the figure. If 'auto', use the current figure
32663266
facecolor.
32673267
3268-
edgecolor : color or 'auto', default: :rc:`savefig.edgecolor`
3268+
edgecolor : :mpltype:`color` or 'auto', default: :rc:`savefig.edgecolor`
32693269
The edgecolor of the figure. If 'auto', use the current figure
32703270
edgecolor.
32713271

lib/matplotlib/lines.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ def set_color(self, color):
10561056
10571057
Parameters
10581058
----------
1059-
color : color; see :ref:`colors_def`
1059+
color : :mpltype:`color`
10601060
"""
10611061
mcolors._check_color_like(color=color)
10621062
self._color = color
@@ -1111,7 +1111,7 @@ def set_gapcolor(self, gapcolor):
11111111
11121112
Parameters
11131113
----------
1114-
gapcolor : color or None
1114+
gapcolor : :mpltype:`color` or None
11151115
The color with which to fill the gaps. If None, the gaps are
11161116
unfilled.
11171117
"""
@@ -1214,7 +1214,7 @@ def set_markeredgecolor(self, ec):
12141214
12151215
Parameters
12161216
----------
1217-
ec : color
1217+
ec : :mpltype:`color`
12181218
"""
12191219
self._set_markercolor("markeredgecolor", True, ec)
12201220

@@ -1224,7 +1224,7 @@ def set_markerfacecolor(self, fc):
12241224
12251225
Parameters
12261226
----------
1227-
fc : color
1227+
fc : :mpltype:`color`
12281228
"""
12291229
self._set_markercolor("markerfacecolor", True, fc)
12301230

@@ -1234,7 +1234,7 @@ def set_markerfacecoloralt(self, fc):
12341234
12351235
Parameters
12361236
----------
1237-
fc : color
1237+
fc : :mpltype:`color`
12381238
"""
12391239
self._set_markercolor("markerfacecoloralt", False, fc)
12401240

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy