@@ -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 `.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 `.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,15 @@ 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
+ """
752
+ Draw the Line using the given renderer.
753
+
754
+ This does not have any effect if the line is not `.visible`.
755
+
756
+ Parameters
757
+ ----------
758
+ renderer : `.RendererBase` subclass.
759
+ """
733
760
if not self .get_visible ():
734
761
return
735
762
@@ -864,22 +891,51 @@ def get_antialiased(self):
864
891
return self ._antialiased
865
892
866
893
def get_color (self ):
867
- """Return the line color."""
894
+ """
895
+ Return the line color.
896
+
897
+ See also `.set_color`.
898
+ """
868
899
return self ._color
869
900
870
901
def get_drawstyle (self ):
902
+ """
903
+ Return the drawstyle.
904
+
905
+ See also `.set_drawstyle`.
906
+ """
871
907
return self ._drawstyle
872
908
873
909
def get_linestyle (self ):
910
+ """
911
+ Return the linestyle.
912
+
913
+ See also `.set_linestyle`.
914
+ """
874
915
return self ._linestyle
875
916
876
917
def get_linewidth (self ):
918
+ """
919
+ Return the linewidth in points.
920
+
921
+ See also `.set_linewidth`.
922
+ """
877
923
return self ._linewidth
878
924
879
925
def get_marker (self ):
926
+ """
927
+ Return the line marker.
928
+
929
+ See also `.set_marker`.
930
+ """
880
931
return self ._marker .get_marker ()
881
932
882
933
def get_markeredgecolor (self ):
934
+ """
935
+ Return the marker edge color.
936
+
937
+ See also `.set_markeredgecolor`.
938
+ """
883
939
mec = self ._markeredgecolor
884
940
if cbook ._str_equal (mec , 'auto' ):
885
941
if rcParams ['_internal.classic_mode' ]:
@@ -892,6 +948,11 @@ def get_markeredgecolor(self):
892
948
return mec
893
949
894
950
def get_markeredgewidth (self ):
951
+ """
952
+ Return the marker edge width in points.
953
+
954
+ See also `.set_markeredgewidth`.
955
+ """
895
956
return self ._markeredgewidth
896
957
897
958
def _get_markerfacecolor (self , alt = False ):
@@ -905,12 +966,27 @@ def _get_markerfacecolor(self, alt=False):
905
966
return fc
906
967
907
968
def get_markerfacecolor (self ):
969
+ """
970
+ Return the marker face color.
971
+
972
+ See also `.set_markerfacecolor`.
973
+ """
908
974
return self ._get_markerfacecolor (alt = False )
909
975
910
976
def get_markerfacecoloralt (self ):
977
+ """
978
+ Return the alternate marker face color.
979
+
980
+ See also `.set_markerfacecoloralt`.
981
+ """
911
982
return self ._get_markerfacecolor (alt = True )
912
983
913
984
def get_markersize (self ):
985
+ """
986
+ Return the marker size in points.
987
+
988
+ See also `.set_markersize`.
989
+ """
914
990
return self ._markersize
915
991
916
992
def get_data (self , orig = True ):
@@ -1252,7 +1328,7 @@ def set_dashes(self, seq):
1252
1328
self .set_linestyle ((0 , seq ))
1253
1329
1254
1330
def update_from (self , other ):
1255
- """copy properties from other to self"""
1331
+ """Copy properties from other to self. """
1256
1332
Artist .update_from (self , other )
1257
1333
self ._linestyle = other ._linestyle
1258
1334
self ._linewidth = other ._linewidth
@@ -1278,7 +1354,7 @@ def update_from(self, other):
1278
1354
1279
1355
def set_dash_joinstyle (self , s ):
1280
1356
"""
1281
- Set the join style for dashed linestyles .
1357
+ Set the join style for dashed lines .
1282
1358
1283
1359
Parameters
1284
1360
----------
@@ -1295,7 +1371,7 @@ def set_dash_joinstyle(self, s):
1295
1371
1296
1372
def set_solid_joinstyle (self , s ):
1297
1373
"""
1298
- Set the join style for solid linestyles .
1374
+ Set the join style for solid lines .
1299
1375
1300
1376
Parameters
1301
1377
----------
@@ -1313,19 +1389,23 @@ def set_solid_joinstyle(self, s):
1313
1389
1314
1390
def get_dash_joinstyle (self ):
1315
1391
"""
1316
- Get the join style for dashed linestyles.
1392
+ Return the join style for dashed lines.
1393
+
1394
+ See also `.set_dash_joinstyle`.
1317
1395
"""
1318
1396
return self ._dashjoinstyle
1319
1397
1320
1398
def get_solid_joinstyle (self ):
1321
1399
"""
1322
- Get the join style for solid linestyles.
1400
+ Return the join style for solid lines.
1401
+
1402
+ See also `.set_solid_joinstyle`.
1323
1403
"""
1324
1404
return self ._solidjoinstyle
1325
1405
1326
1406
def set_dash_capstyle (self , s ):
1327
1407
"""
1328
- Set the cap style for dashed linestyles .
1408
+ Set the cap style for dashed lines .
1329
1409
1330
1410
Parameters
1331
1411
----------
@@ -1341,7 +1421,7 @@ def set_dash_capstyle(self, s):
1341
1421
1342
1422
def set_solid_capstyle (self , s ):
1343
1423
"""
1344
- Set the cap style for solid linestyles .
1424
+ Set the cap style for solid lines .
1345
1425
1346
1426
Parameters
1347
1427
----------
@@ -1357,18 +1437,26 @@ def set_solid_capstyle(self, s):
1357
1437
1358
1438
def get_dash_capstyle (self ):
1359
1439
"""
1360
- Get the cap style for dashed linestyles.
1440
+ Return the cap style for dashed lines.
1441
+
1442
+ See also `.set_dash_capstyle`.
1361
1443
"""
1362
1444
return self ._dashcapstyle
1363
1445
1364
1446
def get_solid_capstyle (self ):
1365
1447
"""
1366
- Get the cap style for solid linestyles.
1448
+ Return the cap style for solid lines.
1449
+
1450
+ See also `.set_solid_capstyle`.
1367
1451
"""
1368
1452
return self ._solidcapstyle
1369
1453
1370
1454
def is_dashed (self ):
1371
- """Return whether line is dashstyle."""
1455
+ """
1456
+ Return whether line has a dashed linestyle.
1457
+
1458
+ See also `.set_linestyle`.
1459
+ """
1372
1460
return self ._linestyle in ('--' , '-.' , ':' )
1373
1461
1374
1462
0 commit comments