mne官方提供绘制地形图的例子:https://mne.tools/stable/auto_examples/visualization/evoked_topomap.html#sphx-glr-auto-examples-visualization-evoked-topomap-py
跟着教程绘制即可,下面是我绘制地形图的代码
def plot_topomap(evoke):
'''
:param evoke: evoked data
:return:
'''
# 设置想要绘制的地形图的指定时间
times = np.arange(0.1, 0.5, 0.02)
# ncols是指每一行显示的个数,contours是指地形图的等高线数
evoke.plot_topomap(times, ncols=4, nrows='auto', contours=9, ch_type='eeg')
这边补充一个python小知识:np.linspace和np.arange有什么区别