@@ -30,27 +30,25 @@ class Collection(artist.Artist, cm.ScalarMappable):
30
30
r"""
31
31
Base class for Collections. Must be subclassed to be usable.
32
32
33
- A Collection represents a sequence of `~.patches .Patch`\s that can be drawn
33
+ A Collection represents a sequence of `.Patch`\s that can be drawn
34
34
more efficiently together than individually. For example, when a single
35
35
path is being drawn repeatedly at different offsets, the renderer can
36
36
typically execute a ``draw_marker()`` call much more efficiently than a
37
37
series of repeated calls to ``draw_path()`` with the offsets put in
38
38
one-by-one.
39
39
40
40
Most properties of a collection can be configured per-element. Therefore,
41
- Collections have "plural" versions of many of the properties of a
42
- `~.patches.Patch` (e.g. `.Collection.get_paths` instead of
43
- `~.patches.Patch.get_path`). Exceptions are the *zorder*, *hatch*,
44
- *pickradius*, *capstyle* and *joinstyle* properties, which can only be set
45
- globally for the whole collection.
41
+ Collections have "plural" versions of many of the properties of a `.Patch`
42
+ (e.g. `.Collection.get_paths` instead of `.Patch.get_path`). Exceptions are
43
+ the *zorder*, *hatch*, *pickradius*, *capstyle* and *joinstyle* properties,
44
+ which can only be set globally for the whole collection.
46
45
47
46
Besides these exceptions, all properties can be specified as single values
48
47
(applying to all elements) or sequences of values. The property of the
49
- ``i``th element of the collection is::
48
+ ``i``\ th element of the collection is::
50
49
51
50
prop[i % len(prop)]
52
51
53
-
54
52
Each Collection can optionally be used as its own `~.cm.ScalarMappable` by
55
53
passing the *norm* and *cmap* parameters to its constructor. If the
56
54
Collection's `~.cm.ScalarMappable` matrix ``_A`` has been set (via a call
@@ -129,15 +127,15 @@ def __init__(self,
129
127
offset_position : {'screen' (default), 'data' (deprecated)}
130
128
If set to 'data' (deprecated), *offsets* will be treated as if it
131
129
is in data coordinates instead of in screen coordinates.
132
- norm : `~.colors.Normalize`, optional, default: None
130
+ norm : `~.colors.Normalize`, optional
133
131
Forwarded to `~.cm.ScalarMappable`. The default of
134
132
``None`` means that the first draw call will set ``vmin`` and
135
133
``vmax`` using the minimum and maximum values of the data.
136
- cmap : `~.colors.Colormap`, optional, default: None
134
+ cmap : `~.colors.Colormap`, optional
137
135
Forwarded to `~.cm.ScalarMappable`. The default of
138
136
``None`` will result in :rc:`image.cmap` being used.
139
- hatch : str, optional, default: None
140
- Hatching pattern to use in filled paths, if any. Valid strings are
137
+ hatch : str, optional
138
+ Hatching pattern to use in filled paths, if any. Valid strings are
141
139
['/', '\\ ', '|', '-', '+', 'x', 'o', 'O', '.', '*']. See
142
140
:doc:`/gallery/shapes_and_collections/hatch_demo` for the meaning
143
141
of each hatch type.
@@ -148,7 +146,7 @@ def __init__(self,
148
146
other hand, if it is greater than 0, then we instead check if the
149
147
test point is contained in a stroke of width ``2*pickradius``
150
148
following any of the Paths in the Collection.
151
- urls : list of str, optional, default: None
149
+ urls : list of str, default: None
152
150
A URL for each patch to link to once drawn. Currently only works
153
151
for the SVG backend. See :doc:`/gallery/misc/hyperlinks_sgskip` for
154
152
examples.
@@ -468,7 +466,7 @@ def set_urls(self, urls):
468
466
"""
469
467
Parameters
470
468
----------
471
- urls : sequence of str or None
469
+ urls : list of str or None
472
470
473
471
Notes
474
472
-----
@@ -726,7 +724,7 @@ def set_antialiased(self, aa):
726
724
727
725
Parameters
728
726
----------
729
- aa : bool or sequence of bools
727
+ aa : bool or list of bools
730
728
"""
731
729
if aa is None :
732
730
aa = mpl .rcParams ['patch.antialiased' ]
@@ -739,7 +737,7 @@ def set_color(self, c):
739
737
740
738
Parameters
741
739
----------
742
- c : color or sequence of rgba tuples
740
+ c : color or list of rgba tuples
743
741
744
742
See Also
745
743
--------
@@ -772,7 +770,7 @@ def set_facecolor(self, c):
772
770
773
771
Parameters
774
772
----------
775
- c : color or sequence of colors
773
+ c : color or list of colors
776
774
"""
777
775
self ._original_facecolor = c
778
776
self ._set_facecolor (c )
@@ -820,7 +818,7 @@ def set_edgecolor(self, c):
820
818
821
819
Parameters
822
820
----------
823
- c : color or sequence of colors or 'face'
821
+ c : color or list of colors or 'face'
824
822
The collection edgecolor(s). If a sequence, the patches cycle
825
823
through it. If 'face', match the facecolor.
826
824
"""
@@ -938,9 +936,9 @@ def __init__(self, paths, sizes=None, **kwargs):
938
936
"""
939
937
Parameters
940
938
----------
941
- paths : list of matplotlib .path.Path
939
+ paths : list of ` .path.Path`
942
940
The paths that will make up the `.Collection`.
943
- sizes : array-like of float
941
+ sizes : array-like
944
942
The factor by which to scale each drawn `~.path.Path`. One unit
945
943
squared in the Path's data space is scaled to be ``sizes**2``
946
944
points when rendered.
@@ -1102,11 +1100,11 @@ def __init__(self, verts, sizes=None, closed=True, **kwargs):
1102
1100
"""
1103
1101
Parameters
1104
1102
----------
1105
- verts : sequence of array-like
1103
+ verts : list of array-like
1106
1104
The sequence of polygons [*verts0*, *verts1*, ...] where each
1107
1105
element *verts_i* defines the vertices of polygon *i* as a 2D
1108
1106
array-like of of shape (M, 2).
1109
- sizes : array-like of float , default: None
1107
+ sizes : array-like, default: None
1110
1108
Squared scaling factors for the polygons. The coordinates of each
1111
1109
polygon *verts_i* are multiplied by the square-root of the
1112
1110
corresponding entry in *sizes* (i.e., *sizes* specify the scaling
@@ -1129,7 +1127,7 @@ def set_verts(self, verts, closed=True):
1129
1127
1130
1128
Parameters
1131
1129
----------
1132
- verts : sequence
1130
+ verts : list of array-like
1133
1131
The sequence of polygons [*verts0*, *verts1*, ...] where each
1134
1132
element *verts_i* defines the vertices of polygon *i* as a 2D
1135
1133
array-like of of shape (M, 2).
@@ -1194,7 +1192,7 @@ def __init__(self, xranges, yrange, **kwargs):
1194
1192
"""
1195
1193
Parameters
1196
1194
----------
1197
- xranges : sequence of (float, float)
1195
+ xranges : list of (float, float)
1198
1196
The sequence of (left-edge-position, width) pairs for each bar.
1199
1197
yrange : (float, float)
1200
1198
The (lower-edge, height) common to all bars.
@@ -1315,7 +1313,7 @@ class LineCollection(Collection):
1315
1313
prop[i % len(prop)]
1316
1314
1317
1315
A *LineCollection*'s properties default to their ``'lines'`` values in
1318
- `~.matplotlib. rcParams` instead of their ``'patch'`` values, and the
1316
+ `~.rcParams` instead of their ``'patch'`` values, and the
1319
1317
property *colors* is added in place of *edgecolors*.
1320
1318
"""
1321
1319
@@ -1338,7 +1336,7 @@ def __init__(self, segments, # Can be None.
1338
1336
"""
1339
1337
Parameters
1340
1338
----------
1341
- segments: sequence of array-like
1339
+ segments: list of array-like
1342
1340
A sequence of (*line0*, *line1*, *line2*), where::
1343
1341
1344
1342
linen = (x0, y0), (x1, y1), ... (xm, ym)
@@ -1669,7 +1667,7 @@ def __init__(self, sizes, **kwargs):
1669
1667
Parameters
1670
1668
----------
1671
1669
sizes : float or array-like
1672
- Gives the area of each circle in points^2.
1670
+ The area of each circle in points^2.
1673
1671
**kwargs
1674
1672
Forwarded to `.Collection`.
1675
1673
"""
0 commit comments