diff --git a/mne/viz/topomap.py b/mne/viz/topomap.py index 4641014b96e..df6c16f622b 100644 --- a/mne/viz/topomap.py +++ b/mne/viz/topomap.py @@ -1647,7 +1647,7 @@ def plot_ica_components( fig.canvas.draw() # add title selection interactivity - def onclick_title(event, ica=ica, titles=subplot_titles): + def onclick_title(event, ica=ica, titles=subplot_titles, fig=fig): # check if any title was pressed title_pressed = None for title in titles: