diff --git a/wxPython/wx/lib/plot.py b/wxPython/wx/lib/plot.py index 7bb44770e5..ee1b9cf914 100644 --- a/wxPython/wx/lib/plot.py +++ b/wxPython/wx/lib/plot.py @@ -1139,7 +1139,7 @@ class PlotCanvas(wx.Panel): l.append(cn) return l - def GetClosetPoint(self, pntXY, pointScaled= True): + def GetClosestPoint(self, pntXY, pointScaled= True): """Returns list with [curveNumber, legend, index of closest point, pointXY, scaledXY, distance] list for only the closest curve. @@ -1159,6 +1159,8 @@ class PlotCanvas(wx.Panel): mdist = min(dists) #Min dist i = dists.index(mdist) #index for min dist return closestPts[i] #this is the closest point on closest curve + + GetClosetPoint = GetClosestPoint def UpdatePointLabel(self, mDataDict): """Updates the pointLabel point on screen with data contained in @@ -2029,7 +2031,7 @@ class TestFrame(wx.Frame): if self.client.GetEnablePointLabel() == True: #make up dict with info for the pointLabel #I've decided to mark the closest point on the closest curve - dlst= self.client.GetClosetPoint( self.client._getXY(event), pointScaled= True) + dlst= self.client.GetClosestPoint( self.client._getXY(event), pointScaled= True) if dlst != []: #returns [] if none curveNum, legend, pIndex, pointXY, scaledXY, distance = dlst #make up dictionary to pass to my user function (see DrawPointLabel)