Click on a channel name in a raw/epochs/ICA browse-style plot.
(fig, ch_index=0, button=1)
| 374 | |
| 375 | |
| 376 | def _click_ch_name(fig, ch_index=0, button=1): |
| 377 | """Click on a channel name in a raw/epochs/ICA browse-style plot.""" |
| 378 | from ..viz.utils import _fake_click |
| 379 | |
| 380 | fig.canvas.draw() |
| 381 | text = fig.mne.ax_main.get_yticklabels()[ch_index] |
| 382 | bbox = text.get_window_extent() |
| 383 | x = bbox.intervalx.mean() |
| 384 | y = bbox.intervaly.mean() |
| 385 | _fake_click(fig, fig.mne.ax_main, (x, y), xform="pix", button=button) |
| 386 | |
| 387 | |
| 388 | def _get_suptitle(fig): |
no test coverage detected