% eegplugin_erp() - plot ERP plugin function eegplugin_erp( fig, try_strings, catch_strings); % create menu plotmenu = findobj(fig, 'tag', 'plot'); uimenu( plotmenu, 'label', 'ERP plugin', ... 'callback', 'figure; plot(EEG.times, mean(EEG.data,3))');