File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -444,9 +444,6 @@ def contains(self, mouseevent):
444444 if inside is not None :
445445 return inside , info
446446
447- if not isinstance (self .pickradius , Number ):
448- raise ValueError ("pick radius should be a distance" )
449-
450447 # Make sure we have data to plot
451448 if self ._invalidy or self ._invalidx :
452449 self .recache ()
@@ -495,7 +492,7 @@ def get_pickradius(self):
495492
496493 See `.contains` for more details.
497494 """
498- return self .pickradius
495+ return self ._pickradius
499496
500497 def set_pickradius (self , d ):
501498 """Set the pick radius used for containment tests.
@@ -507,7 +504,11 @@ def set_pickradius(self, d):
507504 d : float
508505 Pick radius, in points.
509506 """
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 )
511512
512513 def get_fillstyle (self ):
513514 """
You can’t perform that action at this time.
0 commit comments