@@ -1171,29 +1171,52 @@ def __init__(self, segments, # Can be None.
1171
1171
** kwargs
1172
1172
):
1173
1173
"""
1174
- *segments*
1175
- a sequence of (*line0*, *line1*, *line2*), where::
1174
+ Parameters
1175
+ ----------
1176
+ segments :
1177
+ A sequence of (*line0*, *line1*, *line2*), where::
1176
1178
1177
1179
linen = (x0, y0), (x1, y1), ... (xm, ym)
1178
1180
1179
1181
or the equivalent numpy array with two columns. Each line
1180
1182
can be a different length.
1181
1183
1182
- * colors*
1183
- must be a sequence of RGBA tuples (e.g., arbitrary color
1184
+ colors : sequence, optional
1185
+ A sequence of RGBA tuples (e.g., arbitrary color
1184
1186
strings, etc, not allowed).
1185
1187
1186
- * antialiaseds*
1187
- must be a sequence of ones or zeros
1188
+ antialiaseds : sequence, optional
1189
+ A sequence of ones or zeros.
1188
1190
1189
- *linestyles* [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
1190
- a string or dash tuple. The dash tuple is::
1191
+ linestyles : string, tuple, optional
1192
+ Either one of [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ], or
1193
+ a dash tuple. The dash tuple is::
1191
1194
1192
- (offset, onoffseq),
1195
+ (offset, onoffseq)
1193
1196
1194
- where * onoffseq* is an even length tuple of on and off ink
1197
+ where `` onoffseq`` is an even length tuple of on and off ink
1195
1198
in points.
1196
1199
1200
+ norm : Normalize, optional
1201
+ `~.colors.Normalize` instance.
1202
+
1203
+ cmap : string or Colormap, optional
1204
+ Colormap name or `~.colors.Colormap` instance.
1205
+
1206
+ pickradius : float, optional
1207
+ The tolerance in points for mouse clicks picking a line.
1208
+ Default is 5 pt.
1209
+
1210
+ zorder : int, optional
1211
+ zorder of the LineCollection. Default is 2.
1212
+
1213
+ facecolors : optional
1214
+ The facecolors of the LineCollection. Default is 'none'.
1215
+ Setting to a value other than 'none' will lead to a filled
1216
+ polygon being drawn between points on each line.
1217
+
1218
+ Notes
1219
+ -----
1197
1220
If *linewidths*, *colors*, or *antialiaseds* is None, they
1198
1221
default to their rcParams setting, in sequence form.
1199
1222
@@ -1210,22 +1233,6 @@ def __init__(self, segments, # Can be None.
1210
1233
and this value will be added cumulatively to each successive
1211
1234
segment, so as to produce a set of successively offset curves.
1212
1235
1213
- *norm*
1214
- None (optional for :class:`matplotlib.cm.ScalarMappable`)
1215
- *cmap*
1216
- None (optional for :class:`matplotlib.cm.ScalarMappable`)
1217
-
1218
- *pickradius* is the tolerance for mouse clicks picking a line.
1219
- The default is 5 pt.
1220
-
1221
- *zorder*
1222
- The zorder of the LineCollection. Default is 2
1223
-
1224
- *facecolors*
1225
- The facecolors of the LineCollection. Default is 'none'
1226
- Setting to a value other than 'none' will lead to a filled
1227
- polygon being drawn between points on each line.
1228
-
1229
1236
The use of :class:`~matplotlib.cm.ScalarMappable` is optional.
1230
1237
If the :class:`~matplotlib.cm.ScalarMappable` array
1231
1238
:attr:`~matplotlib.cm.ScalarMappable._A` is not None (i.e., a call to
@@ -1278,6 +1285,13 @@ def set_segments(self, segments):
1278
1285
set_paths = set_segments
1279
1286
1280
1287
def get_segments (self ):
1288
+ """
1289
+ Returns
1290
+ -------
1291
+ segments : list
1292
+ List of segments in the LineCollection. Each list item contains an
1293
+ array of vertices.
1294
+ """
1281
1295
segments = []
1282
1296
1283
1297
for path in self ._paths :
@@ -1302,12 +1316,14 @@ def _add_offsets(self, segs):
1302
1316
1303
1317
def set_color (self , c ):
1304
1318
"""
1305
- Set the color(s) of the line collection. *c* can be a
1306
- matplotlib color arg (all patches have same color), or a
1307
- sequence or rgba tuples; if it is a sequence the patches will
1308
- cycle through the sequence.
1319
+ Set the color(s) of the LineCollection.
1309
1320
1310
- ACCEPTS: matplotlib color arg or sequence of rgba tuples
1321
+ Parameters
1322
+ ----------
1323
+ c :
1324
+ Matplotlib color argument (all patches have same color), or a
1325
+ sequence or rgba tuples; if it is a sequence the patches will
1326
+ cycle through the sequence.
1311
1327
"""
1312
1328
self .set_edgecolor (c )
1313
1329
self .stale = True
0 commit comments