removed message, removed draw from release_select, added view limits update in scatterplot
This commit is contained in:
parent
e846a83cb8
commit
2e2fa85727
|
@ -273,6 +273,7 @@ class NavToolbar(NavigationToolbar2):
|
|||
def __init__(self, *args):
|
||||
NavigationToolbar2.__init__(self, *args)
|
||||
self._select_callback = None
|
||||
self.message.hide()
|
||||
|
||||
def select(self, *args):
|
||||
"""Selection mode selected handler."""
|
||||
|
@ -294,8 +295,7 @@ class NavToolbar(NavigationToolbar2):
|
|||
self._idRelease = self.canvas.mpl_connect('button_release_event', self.release_select)
|
||||
self.mode = 'Select rectangle mode'
|
||||
|
||||
#self.set_message(self.mode)
|
||||
self.set_message(None)
|
||||
self.set_message(self.mode)
|
||||
|
||||
def set_message(self, s):
|
||||
"""Set status in toolbar to string s.
|
||||
|
@ -332,7 +332,6 @@ class NavToolbar(NavigationToolbar2):
|
|||
self._select_callback(lastx, lasty, x, y)
|
||||
|
||||
self._xypress = None
|
||||
self.draw()
|
||||
self.release(event)
|
||||
|
||||
def mouse_move(self, event):
|
||||
|
@ -495,6 +494,7 @@ class ScatterPlot(Plot):
|
|||
if len(self.ax.lines)>1:
|
||||
del self.ax.lines[-1]
|
||||
self.ax.plot(xdata_new,ydata_new,'ok')
|
||||
self._toolbar.forward() #update data lims before draw
|
||||
self.canvas.draw()
|
||||
|
||||
class NetworkPlot(Plot):
|
||||
|
|
Reference in New Issue