⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 topoplot.m

📁 含有多种ICA算法的eeglab工具箱
💻 M
📖 第 1 页 / 共 4 页
字号:
% topoplot() - plot a topographic map of a scalp data field in a 2-D circular view %              (looking down at the top of the head) using interpolation on a fine %              cartesian grid. Can also show specified channnel location(s), or return %              an interpolated value at an arbitrary scalp location (see 'noplot').%              By default, channel locations below head center (arc_length 0.5) are %              shown in a 'skirt' outside the cartoon head (see 'plotrad' and 'headrad' %              options below). Nose is at top of plot; left is left; right is right.% Usage:%        >>  topoplot(datavector, EEG.chanlocs);   % use a channel locations structure%        >>  topoplot(datavector, 'my_chan.locs'); % read a channel locations file%        >>  [h val grid] = topoplot(datavector, chan_locs, 'Param1','Value1', ...);%% Required Inputs:%   datavector        - single vector of channel values. Else, if a vector of selected %                       channel numbers -> mark their location(s) using 'style' 'blank'.%   chan_locs         - name of an EEG electrode position file (>> topoplot example).%                       Else, an EEG.chanlocs structure (>> help pop_editset)% Optional inputs:%   'maplimits'       - 'absmax'   -> scale map colors to +/- the absolute-max (makes green 0); %                       'maxmin'   -> scale colors to the data range (makes green mid-range); %                       [lo.hi]    -> use user-definined lo/hi limits {default: 'absmax'}%   'style'           - 'map'      -> plot colored map only%                       'contour'  -> plot contour lines only%                       'both'     -> plot both colored map and contour lines%                       'fill'     -> plot constant color between contour lines%                       'blank'    -> plot electrode locations only {default: 'both'}%   'electrodes'      - 'on','off','labels','numbers','ptslabels','ptsnumbers' See Plot detail %                       options below. {default: 'off' -> mark electrode locations with points}. %   'plotrad'         - [0.15<=float<=1.0] plotting radius = max channel arc_length to plot.%                       See >> topoplot example. If plotrad > 0.5, chans with arc_length > 0.5 %                       (i.e. below ears-eyes) are plotted in a circular 'skirt' outside the%                       cartoon head. See 'intrad' below. {default: max(max(chanlocs.radius),0.5)}. %   'headrad'         - [0.15<=float<=1.0] drawing radius (arc_length) for the cartoon head. %                       NOTE: only headrad = 0.5 is anatomically correct! 0 -> don't draw head; %                       'rim' -> show cartoon head at outer edge of the plot {default: 0.5}%   'conv'            - ['on'|'off'] Show map interpolation only out to the convext hull of%                       the electrode locations to minimize extrapolation.  {default: 'off'}%   'noplot'          - ['on'|'off'|[rad theta]] do not plot (but return interpolated data).%                       Else, if [rad theta] are coordinates of a (possibly missing) channel, %                       returns interpolated value for channel location.  For more info, %                       see >> topoplot 'example' {default: 'off'}% Dipole plotting:%   'dipole'          - [xi yi xe ye ze] plot dipole on the top of the scalp map%                       from coordinate (xi,yi) to coordinates (xe,ye,ze) (dipole head %                       model has radius 1). If several rows, plot one dipole per row.%                       Coordinates returned by dipplot() may be used. Can accept%                       an EEG.dipfit.model structure (See >> help dipplot).%                       Ex: ,'dipole',EEG.dipfit.model(17) % Plot dipole(s) for comp. 17.%   'dipnorm'         - ['on'|'off'] normalize dipole length {default: 'on'}.%   'diporient'       - [-1|1] invert dipole orientation {default: 1}.%   'diplen'          - [real] scale dipole length {default: 1}.%   'dipscale'        - [real] scale dipole size {default: 1}.%   'dipsphere'       - [real] size of the dipole sphere. {default: 85 mm}.%   'dipcolor'        - [color] dipole color as Matlab code code or [r g b] vector%                       {default: 'k' = black}.% Plot detail options:%   'intrad'          - [0.15<=float<=1.0] radius of the interpolation area (square or disk, see%                       'intsquare' below). Interpolate electrodes in this area {default: channel max}%   'intsquare'       - ['on'|'off'] 'on' -> Interpolate values at electrodes located in the whole %                       square containing the (radius plotrad) plotting disk. 'off' -> Interpolate%                       values from electrodes shown in the plotting disk only. {default: 'on'}%   'electcolor'{'k'}|'emarker'{'.'}|'emarkersize'{14}|'emarkersize1chan'{40}|'efontsize'{var}%                       electrode marking details and their {defaults}. %   'shading'         - 'flat','interp'  {default: 'flat'}%   'colormap'        -  (n,3) any size colormap {default: existing colormap}%   'numcontour'      - number of contour lines {default: 6}%   'ccolor'          - color of the contours {default: dark grey}%   'hcolor'|'ecolor' - colors of the cartoon head and electrodes {default: black}%   'gridscale'       - [int > 32] size (nrows) of interpolated data matrix {default: 67}%   'circgrid'        - [int > 100] number of elements (angles) in head and border circles {201}%   'shrink'          - ['on'|'off'|'force'|factor] Deprecated. 'on' -> If max channel arc_length %                       > 0.5, shrink electrode coordinates towards vertex to plot all channels%                       by making max arc_length 0.5. 'force' -> Normalize arc_length %                       so the channel max is 0.5. factor -> Apply a specified shrink%                       factor (range (0,1) = shrink fraction). {default: 'off'}%   'verbose'         - ['on'|'off'] comment on operations on command line {default: 'on'}.%% Outputs:%         h           - plot axes handle%         grid/val    - interpolated data image matrix (off-head points = NaN).  %                       ELSE, interpolated value at single input 'noplot' channel location, if any.% Chan_locs format:%    See >> topoplot 'example'%% Notes: - To change the plot map masking ring to a new figure background color,%            >> set(findobj(gca,'type','patch'),'facecolor',get(gcf,'color'))%        - Topoplots may be rotated. From the commandline >> view([deg 90]) {default: [0 90])%% Authors: Andy Spydell, Colin Humphries, Arnaud Delorme & Scott Makeig%          CNL / Salk Institute, 8/1996-/10/2001; SCCN/INC/UCSD, Nov. 2001 -%% See also: timtopo(), envtopo()% Deprecated but still usable;%   'interplimits'    - ['electrodes'|'head'] 'electrodes'-> interpolate the electrode grid; %                       'head'-> interpolate the whole disk {default: 'head'}.% Copyright (C) Colin Humphries & Scott Makeig, CNL / Salk Institute, Aug, 1996%                                          % 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: topoplot.m,v $% Revision 1.205  2004/07/07 22:21:30  arno% debug shrink%% Revision 1.204  2004/06/10 19:11:53  arno% remove debug msg%% Revision 1.203  2004/05/14 23:41:09  arno% allowing negative shrink%% Revision 1.202  2004/05/14 23:29:32  arno% fixing toggle name/number%% Revision 1.201  2004/05/10 15:14:34  scott% more flexible labels/numbers/points argument reading; defined ELECTRODE_HEIGHT%% Revision 1.200  2004/05/07 15:12:51  scott% removed textax, instead plot3() electrode labels/pts/numbers above the rest with plot3() -sm%% Revision 1.199  2004/05/07 04:35:10  scott% superimpose textax again - making both axes square%% Revision 1.198  2004/05/05 21:57:23  hilit% removed text from the previous log message%% Revision 1.197  2004/05/05 20:56:20  hilit% change the defult setting of dipnorm to 'on'.%% Revision 1.197  2004/05/05 13:55:00  hilit% Set the defult option of dipnorm to 'on'%% Revision 1.196  2004/05/05 20:36:04  scott% DIPOLE scaling%% Revision 1.195  2004/05/05 20:21:02  scott% *** empty log message ***%% Revision 1.194  2004/04/29 18:58:48  scott% removed new axes - scaling problem. Toggling pts|numbers doesnt work inside head cartoon.%% Revision 1.193  2004/04/29 18:36:46  scott% test%% Revision 1.192  2004/04/29 18:23:03  scott% make overplot axis limits the same as topoplot limits%% Revision 1.191  2004/04/28 18:19:06  scott% put labels/numbers on another axes so that clicking numbers<->labels% will work inside the head cartoon patch%% Revision 1.190  2004/04/28 17:00:42  scott% no blanking ring when style is 'blank'%% Revision 1.189  2004/04/01 17:10:46  scott% converted 'conv' interpolation to polar%% Revision 1.188  2004/03/31 18:23:15  scott% debug 'conv' mode - plot ears and nose above map surface to avoid masking by 'conv'%% Revision 1.187  2004/03/31 18:06:53  scott% adding 'conv' mode for plotting convex hull; corrected shrink in 'interp' mode%% Revision 1.186  2004/03/31 05:15:05  scott% *** empty log message ***%% Revision 1.185  2004/03/31 05:06:27  scott% implementing 'conv' (undocumented)%% Revision 1.184  2004/03/31 03:19:02  scott% adjust ear lines%% Revision 1.183  2004/03/31 02:53:35  scott% made blanking ring and head filled rings; made default electrodes 'off' iff chans>64; made contour color% dark grey; adjusted nose and ear shapes%% Revision 1.182  2004/03/31 02:08:07  scott% *** empty log message ***%% Revision 1.181  2004/03/30 18:48:21  scott% same%% Revision 1.180  2004/03/30 18:29:08  scott% testing fill ring%% Revision 1.179  2004/03/30 17:38:15  scott% plot ring patch instead of blanking circle%% Revision 1.178  2004/03/25 22:30:13  arno% same thing%% Revision 1.177  2004/03/25 22:26:45  arno% same thing%% Revision 1.176  2004/03/25 22:24:41  arno% fixing shrinkfactor bug%% Revision 1.175  2004/03/24 16:35:25  scott% added 'cricgrid' plotting detail argument%% Revision 1.174  2004/03/23 19:19:34  scott% made 'electrodes' default 'off'%% Revision 1.173  2004/03/23 19:18:32  scott% default: plotrad >= 0.5%% Revision 1.172  2004/03/23 15:20:39  scott% made only 2 outputs%% Revision 1.171  2004/03/23 00:40:06  scott% clarifying handling of un-located channels%% Revision 1.170  2004/03/22 17:57:21  scott% added arg 'intrad' - separated interpolation and plotting areas% Now, by default, interpolates over all the (radius<=1) electrodes.% Added 'intsquare' option - interpolated values in electrodes in the entire% interpolation square, not just the (plotting) disk. Can give more accurate% interpolation at edges of the plotting disk i.e. interpolation instead of% extrapolation), if there are additional channel locations beyond the plotting area%% Revision 1.169  2004/03/22 03:25:41  scott% re-implmenting shrink options%% Revision 1.168  2004/03/21 19:19:18  scott% help message%% Revision 1.167  2004/03/21 18:02:08  scott% debugged deprecated 'shrink' mode code%% Revision 1.166  2004/03/21 17:31:44  scott% nothing%% Revision 1.165  2004/03/21 17:25:39  scott% corrected dipole plotting%% Revision 1.164  2004/03/21 16:52:37  scott% debugged plotrad, headrad plot size setting%% Revision 1.163  2004/03/20 18:20:14  scott% created 'headrad' (removed 'forcehead'). Now uses only 'plotrad' and 'headrad'% to set plotting scales. 'shrink' mode disabled temporarily%% Revision 1.162  2004/03/19 21:57:58  scott% do not plot channels with arc_length > 1%% Revision 1.161  2004/03/19 19:47:13  arno% remove str2num%% Revision 1.160  2004/03/19 19:05:26  scott% read string plotrad from channel locations structure%% Revision 1.159  2004/03/19 17:46:19  scott% added 'forcehead'; changed 'pointnumbers' and 'pointlabels' to 'ptnumbers', 'ptlabels'% but kept backwards compatibility. Allowed marking of multiple channel locations% without requiring an explicit 'style','blank'. Allowed [] data -> plot channel% locations. Improved help message and 'example' text. Switched order of plotting% of head border, electrodes and head cartoon. Made head cartoon not appear by% default when plotrad<0.5 or 'shrink' is severe (but see 'forcehead'). -sm%% Revision 1.158  2004/03/19 02:33:40  scott% plotting head, ears and/or skirt as appropriate from plotrad and shrink args%% Revision 1.157  2004/03/19 01:49:07  scott% plotrad%% Revision 1.156  2004/03/19 00:30:08  scott% plotrad minmax%% Revision 1.155  2004/03/18 17:05:20  arno% fixed plotrad%% Revision 1.154  2004/03/18 16:36:53  arno% debug shrink and plotrad%% Revision 1.153  2004/03/18 16:22:12  arno% debug shrink%% Revision 1.152  2004/03/18 01:47:24  scott% debug%% Revision 1.151  2004/03/18 01:44:28  scott% 'plotrad' arg and help message re skirt%% Revision 1.150  2004/03/18 01:26:33  arno% plotrad%% Revision 1.149  2004/03/18 00:29:07  arno% debug skirt option%% Revision 1.148  2004/03/18 00:18:09  arno% skirt option%% Revision 1.147  2004/02/25 15:29:39  scott% dont plot border if shrinkfac < .01%% Revision 1.146  2004/02/25 15:25:07  scott% adjust border of 'skirt'%% Revision 1.145  2004/02/25 15:19:38  scott% not allowing shrink to be negative%% Revision 1.144  2004/02/23 16:55:51  scott% don't let ears go outside axes if shrink is 'skirt' but shrink factor is 0 or small%% Revision 1.143  2004/02/19 15:56:28  scott% plot dipole(s) last%% Revision 1.142  2004/02/19 15:49:58  scott% plot dipoles inside head in 'skirt' mode%% Revision 1.141  2004/02/18 01:16:53  scott% help message adjust%% Revision 1.140  2004/02/18 01:02:58  scott% 'dipole' help message. Adaptive AXHEADFAC.%% Revision 1.139  2004/02/17 22:44:54  arno% now processing DIPFIT structure and fixed normalization bug%% Revision 1.138  2004/02/17 18:16:35  scott% adjust EMARKERSIZE%% Revision 1.137  2004/02/17 18:11:36  scott% fixed 'skirt'&'fill' problem. Also, made heads bigger%% Revision 1.136  2004/02/17 16:58:24  scott% change color of outer 'shrink' mode ring to almost white, to avoid print bug%% Revision 1.135  2004/02/17 03:14:44  scott% expand skirt border radius%% Revision 1.134  2004/02/15 21:30:01  scott% same%% Revision 1.133  2004/02/15 21:17:07  scott% omit QUAD_SKIRT option - not ready !%% Revision 1.132  2004/02/15 21:02:13  scott% same% Revision 1.96  2004/02/15 19:41:48  scott% skirt with wedges%% Revision 1.95  2004/02/15 17:35:49  scott% added 'style','skirt'%% Revision 1.72  2004/02/15 15:58:33  scott% formatting, try 'shrink','skirt' ...%% Revision 1.71  2004/01/20 04:25:05  scott% help msg edit% .,%% Revision 1.70  2003/12/17 15:49:45  arno% debug chan with no coordinates%% Revision 1.69  2003/12/17 01:25:37  arno% debug plot electrode subset%% Revision 1.68  2003/12/17 00:57:17  arno% subset of electrodes%% Revision 1.67  2003/11/29 23:34:00  scott% help msg%% Revision 1.66  2003/11/06 16:31:18  arno% changing dipnorm%% Revision 1.65  2003/11/06 02:04:41  arno% correct orientation%% Revision 1.64  2003/11/06 01:40:31  arno% diporient%% Revision 1.63  2003/11/06 01:00:57  arno

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -