object selection fix

This commit is contained in:
2006-04-19 18:50:10 +00:00
parent 56dac31529
commit 0eebd9436c
3 changed files with 12 additions and 12 deletions

View File

@@ -286,14 +286,14 @@ class ScatterPlot (Plot):
logger.log('debug','Selected:\n%s'%index)
ids = self.x_dataset.extract_id_from_index('samples',index)
#update selection object
self.c_p.set_selection(self.c_p.sel_obj,self.current_dim,ids)
self.c_p.set_selection(self.current_dim,ids)
logger.log('debug','Selected identifiers:\n%s'%ids)
def update_selection(self,project):
curr_sel = project.get_selection(self.c_p.sel_obj)
ids = curr_sel[self.current_dim]
index = self.x_dataset.extract_index_from_id(self.current_dim,ids)
xdata_new = scipy.take(self.xaxis_data,index)
curr_sel = project.get_selection() # get selection object
ids = curr_sel[self.current_dim] # current identifiers
index = self.x_dataset.extract_index_from_id(self.current_dim,ids) #conversion to index
xdata_new = scipy.take(self.xaxis_data,index) #take data
ydata_new = scipy.take(self.yaxis_data,index)
self.ax.plot(xdata_new,ydata_new,'or')
self.canvas.draw()