File tree 1 file changed +6
-5
lines changed
Filter options
1 file changed +6
-5
lines changed
Original file line number Diff line number Diff line change @@ -444,9 +444,6 @@ def contains(self, mouseevent):
444
444
if inside is not None :
445
445
return inside , info
446
446
447
- if not isinstance (self .pickradius , Number ):
448
- raise ValueError ("pick radius should be a distance" )
449
-
450
447
# Make sure we have data to plot
451
448
if self ._invalidy or self ._invalidx :
452
449
self .recache ()
@@ -495,7 +492,7 @@ def get_pickradius(self):
495
492
496
493
See `.contains` for more details.
497
494
"""
498
- return self .pickradius
495
+ return self ._pickradius
499
496
500
497
def set_pickradius (self , d ):
501
498
"""Set the pick radius used for containment tests.
@@ -507,7 +504,11 @@ def set_pickradius(self, d):
507
504
d : float
508
505
Pick radius, in points.
509
506
"""
510
- self .pickradius = d
507
+ if not isinstance (d , Number ) or d < 0 :
508
+ raise ValueError ("pick radius should be a distance" )
509
+ self ._pickradius = d
510
+
511
+ pickradius = property (get_pickradius , set_pickradius )
511
512
512
513
def get_fillstyle (self ):
513
514
"""
You can’t perform that action at this time.
0 commit comments