Skip to content

Commit a670cc6

Browse files
add self.highlight to interact with GUI
1 parent c86c655 commit a670cc6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ephys/classes/plot/plot_trace.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ def __init__(self, trace: Trace, backend: str = "pyqt", **kwargs) -> None:
267267
self.win = pg.GraphicsLayoutWidget(show=self.params.show, title="Trace Plot")
268268
self.flat_sweep_index_start = np.array([])
269269
self.flat_sweep_index_end = np.array([])
270+
self.highlight: dict[str, int | None] = {"sweep_index": None}
270271

271272
def plot(
272273
self,
@@ -590,6 +591,7 @@ def sweep_highlight(
590591
for sweep in item_list:
591592
if isinstance(sweep, HighlightCurve):
592593
plot_item.removeItem(sweep)
594+
self.highlight["sweep_index"] = sweep_index
593595

594596
def remove_highlight(self) -> None:
595597
self.sweep_highlight(sweep_index=None)

0 commit comments

Comments
 (0)