MCPcopy Create free account
hub / github.com/DeepLabCut/DeepLabCut / on_select

Method on_select

deeplabcut/gui/tracklet_toolbox.py:257–265  ·  view source on GitHub ↗
(self, verts)

Source from the content-addressed store, hash-verified

255 self.toggle()
256
257 def on_select(self, verts):
258 path = Path(verts)
259 xy = self.collection.get_offsets()
260 self.tracker.picked = list(np.nonzero(path.contains_points(xy))[0])
261 self.fc[:, -1] = self.alpha_other
262 self.fc[self.tracker.picked, -1] = self.alpha
263 self.collection.set_color(self.fc)
264 self.tracker.display_traces()
265 self.tracker.fig.canvas.draw_idle() # Force wx backend to redraw the figure
266
267 def toggle(self, *args):
268 if self.is_connected:

Callers

nothing calls this directly

Calls 2

contains_pointsMethod · 0.80
display_tracesMethod · 0.80

Tested by

no test coverage detected