Hi,
Thank you very much for your reply.
I tried your code in this way but it does not work:
import matplotlib.pyplot as plt
import mne
#Load data
r = data_rest + “/AB24 rest_ipol_asr_ICA_MARA.set”
open the file in MNE
rest = mne.io.read_raw_eeglab(r, preload=False, uint16_codec=None, verbose=None)
#Your coding part
fig, ax = plt.subplots()
#using raw.plot_psd()
rest.plot_psd(ax=ax, fmin=0, fmax=50, tmin=0, tmax=420, proj=False, n_fft=1000,dB=True, n_overlap=500, reject_by_annotation=False)
ax.set_title(“Title”)
I also tried to use mne.viz.plot_raw_psd instead of raw.plot_psd:
mne.viz.plot_raw_psd(rest,ax=ax,fmin=0, fmax=50, tmin=0, tmax=420, proj=False, n_fft=1000,dB=True, n_overlap=500, reject_by_annotation=False)
Thank you very much!!
Angelika