EEGLAB ببساطة

تجهيز رسومات للنشر

المحطة 7 · الدرس 4 · EEGLAB 2026.1

من الواجهة

  1. PlotERP map seriesIn 2-D D1 epochs clean scalp
  2. Plotting ERP scalp maps at these latenciesPlot geometry (rows,col.); [] -> near squareOk 100 200 300 400[1 4]
  3. FileSave As
  4. FileExportData and ICA activity to text file
  5. Output file name erp_all.txt
  6. Export ERP average instead of trials:Transpose matrix (elec -> cols):Export channel labels/component numbers:Export time values:Ok

السكربت

EEG = pop_loadset('D1_epochs_clean.set', pwd);
pos = eeg_getepochevent(EEG, 'type', {'square'}, 'timewin', [-5 5], 'fieldname', 'position');
EEG_pos1 = pop_select(EEG, 'trial', find(pos == 1));
EEG_pos2 = pop_select(EEG, 'trial', find(pos == 2));
EEG_pos1.setname = 'D1 epochs clean pos1';
EEG_pos2.setname = 'D1 epochs clean pos2';
chan = find(strcmp({EEG.chanlocs.labels}, 'Pz'));
scalp = find(~ismember({EEG.chanlocs.labels}, {'EOG1', 'EOG2'}));   % EOG is not on the average reference
erp1 = mean(EEG_pos1.data, 3);
erp2 = mean(EEG_pos2.data, 3);
fig1 = figure('Color', 'w', 'Units', 'centimeters', 'Position', [2 2 9 7]);
hold on;
plot(EEG.times, erp1(chan, :), 'Color', [0 0.45 0.74], 'LineWidth', 1.2);
plot(EEG.times, erp2(chan, :), 'Color', [0.85 0.33 0.10], 'LineWidth', 1.2, 'LineStyle', '--');
xline(0, 'k:'); yline(0, 'k-');
xlim([-200 800]);
set(gca, 'YDir', 'normal', 'FontName', 'Arial', 'FontSize', 9, 'TickDir', 'out', 'Box', 'off');
xlabel('Time (ms)'); ylabel('Potential (\muV)');
legend({sprintf('Position 1 (n = %d)', EEG_pos1.trials), ...
        sprintf('Position 2 (n = %d)', EEG_pos2.trials)}, 'Location', 'northeast', 'Box', 'off');
title('Pz', 'FontWeight', 'normal');
exportgraphics(fig1, 'fig_pz_erp.pdf', 'ContentType', 'vector', 'BackgroundColor', 'white');
win = EEG.times >= 300 & EEG.times <= 500;
map1 = mean(erp1(scalp, win), 2);
map2 = mean(erp2(scalp, win), 2);
lim = ceil(max(abs([map1; map2])));
fprintf('Shared color scale: -%d to %d uV\n', lim, lim);
fig2 = figure('Color', 'w', 'Units', 'centimeters', 'Position', [2 2 12 6]);
subplot(1, 2, 1);
topoplot(map1, EEG.chanlocs(scalp), 'maplimits', [-lim lim], 'electrodes', 'on');
title('Position 1', 'FontName', 'Arial', 'FontSize', 9, 'FontWeight', 'normal');
ax = subplot(1, 2, 2);
topoplot(map2, EEG.chanlocs(scalp), 'maplimits', [-lim lim], 'electrodes', 'on');
title('Position 2', 'FontName', 'Arial', 'FontSize', 9, 'FontWeight', 'normal');
axPos = ax.Position;
cb = colorbar('FontName', 'Arial', 'FontSize', 9);
ax.Position = axPos;   % keep both maps the same size
cb.Position = [0.92 0.25 0.02 0.5];
ylabel(cb, '\muV');
exportgraphics(fig2, 'fig_maps_300_500.pdf', 'ContentType', 'vector', 'BackgroundColor', 'white');
exportgraphics(fig2, 'fig_maps_300_500.png', 'Resolution', 600, 'BackgroundColor', 'white');
pop_export(EEG_pos1, 'erp_pos1.txt', 'erp', 'on', 'transpose', 'on', 'elec', 'on', 'time', 'on', 'precision', 4);
pop_export(EEG_pos2, 'erp_pos2.txt', 'erp', 'on', 'transpose', 'on', 'elec', 'on', 'time', 'on', 'precision', 4);

أي قيمة أختار؟

الإعدادالقيمة
الصيغةPDF أو SVG أو EPS (متّجهة) للموجات، و PNG بدقة 600 dpi للخرائط إذا كان الملف المتّجه ثقيلاً
العرضحوالي 9 cm لعمود واحد، وحوالي 18 cm لعمودين
حجم الخط8 إلى 10 نقاط بالمقاس النهائي
الخطوط1 إلى 1.5 نقطة، ونمطان مختلفان للشرطين
مقياس الألوانواحد متماثل لكل الخرائط التي تُقارن، مع شريط ألوان بوحدته
الاتجاهالموجب للأعلى، واذكره
exportgraphicsيحتاج MATLAB R2020a أو أحدث

لقسم Methods

Figures were exported as vector PDF files with MATLAB exportgraphics; scalp maps of both conditions (30 average-referenced scalp channels) share one symmetric color scale of ±[X] µV (topoplot, EEGLAB 2026.1).

النسخة الكاملة: https://simplyeeglab.pages.dev/lesson/publication-figures/

رخصة المحتوى: CC BY-NC-SA 4.0 · MIT (code)

موقع تعليمي مستقل، غير تابع رسمياً لـ EEGLAB أو SCCN.