143
143
144
144
145
145
class MarkerStyle :
146
+ """
147
+ A class representing marker types.
148
+
149
+ Attributes
150
+ ----------
151
+ markers : list
152
+ All known markers.
153
+ filled_markers : list
154
+ All known filled markers. This is a subset of *markers*.
155
+ fillstyles : list
156
+ The supported fillstyles.
157
+ """
146
158
147
159
markers = {
148
160
'.' : 'point' ,
@@ -202,18 +214,11 @@ class MarkerStyle:
202
214
203
215
def __init__ (self , marker = None , fillstyle = None ):
204
216
"""
205
- Attributes
206
- ----------
207
- markers : list of known marks
208
-
209
- fillstyles : list of known fillstyles
210
-
211
- filled_markers : list of known filled markers.
212
-
213
217
Parameters
214
218
----------
215
- marker : str or array-like, default: None
216
- See the descriptions of possible markers in the module docstring.
219
+ marker : str or array-like or None, default: None
220
+ *None* means no marker. For other possible marker values see the
221
+ module docstring `matplotlib.markers`.
217
222
218
223
fillstyle : str, default: 'full'
219
224
One of 'full', 'left', 'right', 'bottom', 'top', 'none'.
@@ -249,11 +254,13 @@ def get_fillstyle(self):
249
254
250
255
def set_fillstyle (self , fillstyle ):
251
256
"""
252
- Sets fillstyle
257
+ Set the fillstyle.
253
258
254
259
Parameters
255
260
----------
256
- fillstyle : string amongst known fillstyles
261
+ fillstyle : {'full', 'left', 'right', 'bottom', 'top', 'none'}
262
+ The part of the marker surface that is colored with
263
+ markerfacecolor.
257
264
"""
258
265
if fillstyle is None :
259
266
fillstyle = rcParams ['markers.fillstyle' ]
@@ -271,6 +278,15 @@ def get_marker(self):
271
278
return self ._marker
272
279
273
280
def set_marker (self , marker ):
281
+ """
282
+ Set the marker.
283
+
284
+ Parameters
285
+ ----------
286
+ marker : str or array-like or None, default: None
287
+ *None* means no marker. For other possible marker values see the
288
+ module docstring `matplotlib.markers`.
289
+ """
274
290
if (isinstance (marker , np .ndarray ) and marker .ndim == 2 and
275
291
marker .shape [1 ] == 2 ):
276
292
self ._marker_function = self ._set_vertices
@@ -300,15 +316,35 @@ def set_marker(self, marker):
300
316
self ._recache ()
301
317
302
318
def get_path (self ):
319
+ """
320
+ Return a `.Path` for the primary part of the marker.
321
+
322
+ For unfilled markers this is the whole marker, for filled markers,
323
+ this is the area to be drawn with *markerfacecolor*.
324
+ """
303
325
return self ._path
304
326
305
327
def get_transform (self ):
328
+ """
329
+ Return the transform to be applied to the `.Path` from
330
+ `MarkerStyle.get_path()`.
331
+ """
306
332
return self ._transform .frozen ()
307
333
308
334
def get_alt_path (self ):
335
+ """
336
+ Return a `.Path` for the alternate part of the marker.
337
+
338
+ For unfilled markers, this is *None*; for filled markers, this is the
339
+ area to be drawn with *markerfacecoloralt*.
340
+ """
309
341
return self ._alt_path
310
342
311
343
def get_alt_transform (self ):
344
+ """
345
+ Return the transform to be applied to the `.Path` from
346
+ `MarkerStyle.get_alt_path()`.
347
+ """
312
348
return self ._alt_transform .frozen ()
313
349
314
350
def get_snap_threshold (self ):
0 commit comments