@@ -436,11 +436,18 @@ def contains(self, mouseevent):
436
436
:meth:`~matplotlib.lines.Line2D.set_pickradius` to view or
437
437
modify it.
438
438
439
- Returns *True* if any values are within the radius along with
440
- ``{'ind': pointlist}``, where *pointlist* is the set of points
441
- within the radius .
439
+ Parameters
440
+ ----------
441
+ mouseevent : `matplotlib.backend_bases.MouseEvent` .
442
442
443
- TODO: sort returned indices by distance
443
+ Returns
444
+ -------
445
+ contains : bool
446
+ Whether any values are within the radius.
447
+ ``{'ind': pointlist}``
448
+ Where *pointlist* is the set of points within the radius.
449
+
450
+ TODO: sort returned indices by distance
444
451
"""
445
452
if callable (self ._contains ):
446
453
return self ._contains (self , mouseevent )
@@ -492,12 +499,18 @@ def contains(self, mouseevent):
492
499
return len (ind ) > 0 , dict (ind = ind )
493
500
494
501
def get_pickradius (self ):
495
- """Return the pick radius used for containment tests."""
502
+ """
503
+ Return the pick radius used for containment tests.
504
+
505
+ See `.contains` for more details.
506
+ """
496
507
return self .pickradius
497
508
498
509
def set_pickradius (self , d ):
499
510
"""Set the pick radius used for containment tests.
500
511
512
+ See `.contains` for more details.
513
+
501
514
Parameters
502
515
----------
503
516
d : float
@@ -507,7 +520,9 @@ def set_pickradius(self, d):
507
520
508
521
def get_fillstyle (self ):
509
522
"""
510
- Return the marker fillstyle.
523
+ Return the marker fill style.
524
+
525
+ See also `~.Line2D.set_fillstyle`.
511
526
"""
512
527
return self ._marker .get_fillstyle ()
513
528
@@ -585,7 +600,11 @@ def set_markevery(self, every):
585
600
self ._markevery = every
586
601
587
602
def get_markevery (self ):
588
- """Return the markevery setting."""
603
+ """
604
+ Return the markevery setting for marker subsampling.
605
+
606
+ See also `~.Line2D.set_markevery`.
607
+ """
589
608
return self ._markevery
590
609
591
610
def set_picker (self , p ):
@@ -715,7 +734,7 @@ def set_transform(self, t):
715
734
716
735
Parameters
717
736
----------
718
- t : matplotlib.transforms.Transform
737
+ t : ` matplotlib.transforms.Transform`
719
738
"""
720
739
Artist .set_transform (self , t )
721
740
self ._invalidx = True
@@ -729,7 +748,8 @@ def _is_sorted(self, x):
729
748
730
749
@allow_rasterization
731
750
def draw (self , renderer ):
732
- """Draw the Line with *renderer* unless visibility is *False*."""
751
+ # docstring inherited from Artist.draw.
752
+
733
753
if not self .get_visible ():
734
754
return
735
755
@@ -864,22 +884,51 @@ def get_antialiased(self):
864
884
return self ._antialiased
865
885
866
886
def get_color (self ):
867
- """Return the line color."""
887
+ """
888
+ Return the line color.
889
+
890
+ See also `~.Line2D.set_color`.
891
+ """
868
892
return self ._color
869
893
870
894
def get_drawstyle (self ):
895
+ """
896
+ Return the drawstyle.
897
+
898
+ See also `~.Line2D.set_drawstyle`.
899
+ """
871
900
return self ._drawstyle
872
901
873
902
def get_linestyle (self ):
903
+ """
904
+ Return the linestyle.
905
+
906
+ See also `~.Line2D.set_linestyle`.
907
+ """
874
908
return self ._linestyle
875
909
876
910
def get_linewidth (self ):
911
+ """
912
+ Return the linewidth in points.
913
+
914
+ See also `~.Line2D.set_linewidth`.
915
+ """
877
916
return self ._linewidth
878
917
879
918
def get_marker (self ):
919
+ """
920
+ Return the line marker.
921
+
922
+ See also `~.Line2D.set_marker`.
923
+ """
880
924
return self ._marker .get_marker ()
881
925
882
926
def get_markeredgecolor (self ):
927
+ """
928
+ Return the marker edge color.
929
+
930
+ See also `~.Line2D.set_markeredgecolor`.
931
+ """
883
932
mec = self ._markeredgecolor
884
933
if cbook ._str_equal (mec , 'auto' ):
885
934
if rcParams ['_internal.classic_mode' ]:
@@ -892,6 +941,11 @@ def get_markeredgecolor(self):
892
941
return mec
893
942
894
943
def get_markeredgewidth (self ):
944
+ """
945
+ Return the marker edge width in points.
946
+
947
+ See also `~.Line2D.set_markeredgewidth`.
948
+ """
895
949
return self ._markeredgewidth
896
950
897
951
def _get_markerfacecolor (self , alt = False ):
@@ -905,12 +959,27 @@ def _get_markerfacecolor(self, alt=False):
905
959
return fc
906
960
907
961
def get_markerfacecolor (self ):
962
+ """
963
+ Return the marker face color.
964
+
965
+ See also `~.Line2D.set_markerfacecolor`.
966
+ """
908
967
return self ._get_markerfacecolor (alt = False )
909
968
910
969
def get_markerfacecoloralt (self ):
970
+ """
971
+ Return the alternate marker face color.
972
+
973
+ See also `~.Line2D.set_markerfacecoloralt`.
974
+ """
911
975
return self ._get_markerfacecolor (alt = True )
912
976
913
977
def get_markersize (self ):
978
+ """
979
+ Return the marker size in points.
980
+
981
+ See also `~.Line2D.set_markersize`.
982
+ """
914
983
return self ._markersize
915
984
916
985
def get_data (self , orig = True ):
@@ -1252,7 +1321,7 @@ def set_dashes(self, seq):
1252
1321
self .set_linestyle ((0 , seq ))
1253
1322
1254
1323
def update_from (self , other ):
1255
- """copy properties from other to self"""
1324
+ """Copy properties from other to self. """
1256
1325
Artist .update_from (self , other )
1257
1326
self ._linestyle = other ._linestyle
1258
1327
self ._linewidth = other ._linewidth
@@ -1278,7 +1347,7 @@ def update_from(self, other):
1278
1347
1279
1348
def set_dash_joinstyle (self , s ):
1280
1349
"""
1281
- Set the join style for dashed linestyles .
1350
+ Set the join style for dashed lines .
1282
1351
1283
1352
Parameters
1284
1353
----------
@@ -1295,7 +1364,7 @@ def set_dash_joinstyle(self, s):
1295
1364
1296
1365
def set_solid_joinstyle (self , s ):
1297
1366
"""
1298
- Set the join style for solid linestyles .
1367
+ Set the join style for solid lines .
1299
1368
1300
1369
Parameters
1301
1370
----------
@@ -1313,19 +1382,23 @@ def set_solid_joinstyle(self, s):
1313
1382
1314
1383
def get_dash_joinstyle (self ):
1315
1384
"""
1316
- Get the join style for dashed linestyles.
1385
+ Return the join style for dashed lines.
1386
+
1387
+ See also `~.Line2D.set_dash_joinstyle`.
1317
1388
"""
1318
1389
return self ._dashjoinstyle
1319
1390
1320
1391
def get_solid_joinstyle (self ):
1321
1392
"""
1322
- Get the join style for solid linestyles.
1393
+ Return the join style for solid lines.
1394
+
1395
+ See also `~.Line2D.set_solid_joinstyle`.
1323
1396
"""
1324
1397
return self ._solidjoinstyle
1325
1398
1326
1399
def set_dash_capstyle (self , s ):
1327
1400
"""
1328
- Set the cap style for dashed linestyles .
1401
+ Set the cap style for dashed lines .
1329
1402
1330
1403
Parameters
1331
1404
----------
@@ -1341,7 +1414,7 @@ def set_dash_capstyle(self, s):
1341
1414
1342
1415
def set_solid_capstyle (self , s ):
1343
1416
"""
1344
- Set the cap style for solid linestyles .
1417
+ Set the cap style for solid lines .
1345
1418
1346
1419
Parameters
1347
1420
----------
@@ -1357,18 +1430,26 @@ def set_solid_capstyle(self, s):
1357
1430
1358
1431
def get_dash_capstyle (self ):
1359
1432
"""
1360
- Get the cap style for dashed linestyles.
1433
+ Return the cap style for dashed lines.
1434
+
1435
+ See also `~.Line2D.set_dash_capstyle`.
1361
1436
"""
1362
1437
return self ._dashcapstyle
1363
1438
1364
1439
def get_solid_capstyle (self ):
1365
1440
"""
1366
- Get the cap style for solid linestyles.
1441
+ Return the cap style for solid lines.
1442
+
1443
+ See also `~.Line2D.set_solid_capstyle`.
1367
1444
"""
1368
1445
return self ._solidcapstyle
1369
1446
1370
1447
def is_dashed (self ):
1371
- """Return whether line is dashstyle."""
1448
+ """
1449
+ Return whether line has a dashed linestyle.
1450
+
1451
+ See also `~.Line2D.set_linestyle`.
1452
+ """
1372
1453
return self ._linestyle in ('--' , '-.' , ':' )
1373
1454
1374
1455
0 commit comments