📄 eegplot.m
字号:
% eegplot() - Scroll (horizontally and/or vertically) through multichannel data.% The current version (3) allows vertical scrolling through channels % and manual marking/unmarking of data stretches or epochs for rejection.% Usage: % >> eegplot(data, 'key1', value1 ...); % use interface buttons, etc.% else% >> eegplot('noui', data, 'key1', value1 ...); % no user interface%% Menu items:% "Figure > print" - [menu] Print figure in portrait or landscape.% "Figure > Edit figure" - [menu] Remove menus and buttons and call up the standard% Matlab figure menu. Select "Tools > Edit" to format the figure% for publication. Command line equivalent: 'noui' % "Figure > Accept and Close" - [menu] Same as the bottom-right "Reject" button. % "Figure > Cancel and Close" - [menu] Cancel all editing, same as the "Cancel" button. % "Display > Marking color" > [Hide|Show] marks" - [menu] Show or hide patches of % background color behind the data. Mark stretches of *continuous* % data (e.g., for rejection) by dragging the mouse horizontally % over the activity. With *epoched* data, click on the selected epochs.% Clicked on a marked region to unmark it. Called from the% command line, marked data stretches or epochs are returned in % the TMPREJ variable in the global workspace *if/when* the "Reject" % button is pressed (see Outputs); called from pop_eegplot() or % eeglab(), the marked data portions are removed from the current% dataset, and the dataset is automatically updated.% "Display > Marking color > Choose color" - [menu] Change the background marking % color. The marking color(s) of previously marked trials are preserved. % Called from command line, subsequent functions eegplot2event() or % eegplot2trials() allow processing trials marked with different colors % in the TMPREJ output variable. Command line equivalent: 'wincolor'.% "Display > Grid > ..." - [menu] Toggle (on or off) time and/or channel axis grids % in the activity plot. Submenus allow modifications to grid aspects.% Command line equivalents: 'xgrid' / 'ygrid' % "Display > Show scale" - [menu] Show (or hide if shown) the scale on the bottom % right corner of the activity window. Command line equivalent: 'scale' % "Display > Title" - [menu] Change the title of the figure. The command line% equivalent is 'title'% "Settings > Time range to display" - [menu] For continuous EEG data, this item % pops up a query window for entering the number of seconds to display% in the activity window. For epoched data, the query window asks% for the number of epochs to display (this can be fractional). % Command line equivalent: 'winlength'% "Settings > Number of channels to display" - [menu] Number of channels to display% in the activity window. If not all channels are displayed, the % user may scroll through channels using the slider on the left % of the activity plot. Command line equivalent: 'dispchans'% "Settings > Channel labels > ..." - [menu] Use numbers as channel labels or load% a channel location file from disk. If called from the eeglab() menu or% pop_eegplot(), the channel labels of the dataset will be used. % Command line equivalent: 'eloc_file'% "Settings > Zoom on/off" - [menu] Toggle Matlab figure zoom on or off for time and% electrode axes. left-click to zoom (x2); right-click to reverse-zoom. % Else, draw a rectange in the activity window to zoom the display into % that region. NOTE: When zoom is on, data cannot be marked for rejection.% "Settings > Events" - [menu] Toggle event on or off (assuming events have been % given as input). Press "legend" to pop up a legend window for events.% Display window interface:% "Activity plot" - [main window] This axis displays the channel activities. For % continuous data, the time axis shows time in seconds. For epoched% data, the axis label indicate time within each epoch.% "Cancel" - [button] Closes the window and cancels any data rejection marks.% "Event types" - [button] pop up a legend window for events.% "<<" - [button] Scroll backwards though time or epochs by one window length.% "<" - [button] Scroll backwards though time or epochs by 0.2 window length.% "Navigation edit box" - [edit box] Enter a starting time or epoch to jump to.% ">" - [button] Scroll forward though time or epochs by 0.2 window length.% ">>" - [button] Scroll forward though time or epochs by one window length.% "Chan/Time/Value" - [text] If the mouse is within the activity window, indicates% which channel, time, and activity value the cursor is closest to.% "Scale edit box" - [edit box] Scales the displayed amplitude in activity units.% Command line equivalent: 'spacing' % "+ / -" - [buttons] Use these buttons to +/- the amplitude scale by 10%. % "Reject" - [button] When pressed, save rejection marks and close the figure. % Optional input parameter 'command' is evaluated at that time. % NOTE: This button's label can be redefined from the command line% (see 'butlabel' below). If no processing command is specified% for the 'command' parameter (below), this button does not appear.% Required input:% data - Input data matrix, either continuous 2-D (channels,timepoints) or % epoched 3-D (channels,timepoints,epochs). If the data is preceded % by keyword 'noui', GUI control elements are omitted (useful for % plotting data for presentation). A set of power spectra at% each channel may also be plotted (see 'freqlimits' below).% Optional keywords:% 'srate' - Sampling rate in Hz {default|0: 256 Hz}% 'spacing' - Display range per channel (default|0: max(data)-min(data))% 'eloc_file' - Electrode filename (as in >> topoplot example) to read% ascii channel labels. Else,% [vector of integers] -> Show specified channel numbers. Else,% [] -> Do not show channel labels {default|0 -> Show [1:nchans]}% 'limits' - [start end] Time limits for data epochs in ms (for labelling % purpose only).% 'freqlimits' - [start end] If plotting epoch spectra instead of data, frequency % limits of the display. (Data should contain spectral values).% 'winlength' - [value] Seconds (or epochs) of data to display in window {default: 5}% 'dispchans' - [integer] Number of channels to display in the activity window % {default: from data}. If < total number of channels, a vertical % slider on the left side of the figure allows vertical data scrolling. % 'title' - Figure title {default: none}% 'xgrid' - ['on'|'off'] Toggle display of the x-axis grid {default: 'off'}% 'ygrid' - ['on'|'off'] Toggle display of the y-axis grid {default: 'off'}%% Additional keywords:% 'command' - ['string'] Matlab command to evaluate when the 'REJECT' button is % clicked (see Outputs below). The 'REJECT' button is visible only % if this parameter is not empty.% 'butlabel' - Reject button label. {default: 'REJECT'}% 'winrej' - [start end R G B e1 e2 e3 ...] Matrix giving data periods to mark % for rejection, each row indicating a different period% [start end] = period limits (in frames from beginning of data); % [R G B] = specifies the marking color; % [e1 e2 e3 ...] = a (1,nchans) logical [0|1] vector giving % channels (1) to mark and (0) to not mark for rejection.% 'color' - ['on'|'off'|cell array] Plot channels with different colors.% Entering a RGB cell array {'r' 'b' 'g'}, channels will % be plotted using the cell-array color elements. {default: 'off'}. % 'wincolor' - [color] Color mark data stretches or epochs % {default: [ 0.8345 1 0.956]}% 'events' - [struct] EEGLAB event structure.% 'submean' - ['on'|'off'] Remove channel means in each window {default: 'on'}% 'position' - [lowleft_x lowleft_y width height] Position of the figure in pixels.% 'tag' - [string] Matlab object tag to identify this eegplot() window (allows % keeping track of several simultaneous eegplot() windows). % 'children' - [integer] Figure handle of a *dependent* eegplot() window. Scrolling% horizontally in the master window will produce the same scroll in % the dependent window. Allows comparison of two concurrent datasets.% 'scale' - ['on'|'off'] Display the amplitude scale {default: 'on'}.% Outputs:% TMPREJ - Matrix (same format as 'winrej' above) placed as a variable in% the global workspace (only) when the REJECT button is clicked. % The command specified in the 'command' keyword argument can use % this variable. (See eegplot2trial() and eegplot2event()). %% Author: Arnaud Delorme & Colin Humphries, CNL/Salk Institute, SCCN/UCSD , 1998-2001%% See also: eeg_multieegplot(), eegplot2event(), eegplot2trial(), eeglab()% deprecated % 'colmodif' - nested cell array of window colors that may be marked/unmarked. Default% is current color only.%123456789012345678901234567890123456789012345678901234567890123456789012% Copyright (C) 2001 Arnaud Delorme & Colin Humphries, Salk Institute, arno@salk.edu%% This program is free software; you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation; either version 2 of the License, or% (at your option) any later version.%% This program is distributed in the hope that it will be useful,% but WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the% GNU General Public License for more details.%% You should have received a copy of the GNU General Public License% along with this program; if not, write to the Free Software% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA% $Log: eegplot.m,v $% Revision 1.98 2004/07/28 15:49:22 arno% remove warning for Matlab 7%% Revision 1.97 2004/06/04 01:12:35 arno% alignment of event and data (1 point offset error)%% Revision 1.96 2004/05/24 21:02:27 arno% ploting duration of events%% Revision 1.95 2004/04/06 01:30:49 arno% scaling when selecting a number of channel%% Revision 1.94 2004/03/18 23:29:49 arno% nothing%% Revision 1.93 2004/03/18 01:51:34 arno% debug boundary%% Revision 1.92 2004/03/11 18:41:13 arno% boundary events width%% Revision 1.91 2003/12/06 02:13:36 arno% header%% Revision 1.90 2003/11/18 16:24:36 scott% Enter new channel -> New channel%% Revision 1.89 2003/07/29 17:28:14 arno% debuging integer types%% Revision 1.88 2003/07/23 23:45:06 arno% change default dispchan%% Revision 1.87 2003/07/22 17:29:54 arno% adding event button%% Revision 1.86 2003/07/20 19:27:37 scott% "electrodes" -> "channels"%% Revision 1.85 2003/07/20 19:25:10 scott% fixed typo%% Revision 1.84 2003/07/14 23:03:57 arno% handling numerical types%% Revision 1.83 2003/07/12 02:13:47 arno% fixing color, implementing dash%% Revision 1.82 2003/07/12 01:23:46 arno% now handling events%% Revision 1.81 2003/06/28 02:07:18 arno% update header%% Revision 1.80 2003/06/28 02:04:36 arno% debuging zoom and scale%% Revision 1.79 2003/05/23 16:05:47 arno% debug last%% Revision 1.78 2003/05/23 15:12:11 arno% same%% Revision 1.77 2003/05/23 15:11:13 arno% allowing cell array of color as input%% Revision 1.76 2003/03/13 03:04:16 scott% commenting error msg%% Revision 1.75 2003/03/12 03:15:48 arno% adding help menu%% Revision 1.74 2003/02/20 20:56:38 scott% header edit -sm%% Revision 1.73 2003/02/20 20:11:33 arno% replaing ???% /%% Revision 1.72 2003/02/20 19:42:01 scott% edit header msg -sm%% Revision 1.71 2003/02/20 18:35:02 arno% adding interface description and new menu option to edit figure%% Revision 1.70 2003/02/17 03:04:57 arno% typo in header%% Revision 1.69 2003/01/10 01:17:20 arno% default position once more%% Revision 1.68 2003/01/10 01:11:15 arno% new default position%% Revision 1.67 2003/01/10 01:04:31 arno% same, making the figure visible at the end of plot%% Revision 1.66 2003/01/10 01:01:29 arno% updating plotting position%% Revision 1.65 2002/11/15 01:11:59 arno% debugging incallback%% Revision 1.64 2002/11/14 17:03:41 arno% debugging multiple window selection%% Revision 1.63 2002/11/13 00:47:45 arno% debug multiple color display%% Revision 1.62 2002/11/12 23:12:49 arno% compatibility if one extra channel%% Revision 1.61 2002/10/22 17:25:56 arno% add max for selecting regions%% Revision 1.60 2002/10/22 17:12:38 arno% debug 0 limit%% Revision 1.59 2002/10/20 00:13:46 arno% still debuging very low freqs%% Revision 1.58 2002/10/19 23:18:57 arno% debug lim at very low frequencies%% Revision 1.57 2002/10/19 23:10:16 arno% debug last%% Revision 1.56 2002/10/19 23:07:24 arno% implement more exact limits at very low freq.%% Revision 1.55 2002/10/17 18:45:09 arno% implementing nan%% Revision 1.54 2002/10/17 00:42:13 arno% debug last%% Revision 1.53 2002/10/16 23:06:34 arno% default spacing 1%% Revision 1.52 2002/10/04 17:57:12 arno% Y grid text%% Revision 1.51 2002/09/06 19:49:03 arno% custum colors for channels%% Revision 1.50 2002/09/06 19:34:31 arno% noui optimize%% Revision 1.49 2002/09/06 19:29:40 arno% addscale scale argument to toggle on/off the scale at startup%% Revision 1.48 2002/09/05 15:03:43 arno% debug scale%% Revision 1.47 2002/08/28 00:42:57 arno% debugging if no arguments%% Revision 1.46 2002/08/27 23:34:00 arno% debugging xgrid%% Revision 1.45 2002/08/19 19:47:19 arno% debugging last%% Revision 1.44 2002/08/19 19:33:57 arno% bebugging for mac%% Revision 1.43 2002/08/15 01:05:35 arno% debug continuous%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -