Avoid topoplot being plotted

Hello @talhaanwarch and welcome to the forum!

If you’re running the code in an interactive Python window, this can very well be the case. The solution to this is usually to assign the returned figure to a variable, e.g.,

fig = mne.viz.plot_topomap(...)
ar = saveasarray()

Best wishes,
Richard