Project mixing matrix on interpolated sensor topography.
mne.preprocessing.ICA
The ICA solution.
int
| list
of int
| slice
| None
Indices of the independent components (ICs) to visualize.
If an integer, represents the index of the IC to pick.
Multiple ICs can be selected using a list of int or a slice.
The indices are 0-indexed, so picks=1
will
pick the second IC: ICA001
. If None
, all components are plotted in batches of 20.
None
The channel type to plot. For ‘grad’, the gradiometers are collected in pairs and the RMS for each pair is plotted. If None, then channels are chosen in the order given above.
int
The resolution of the topomap image (n pixels along each side).
float
| callable()
| None
Lower and upper bounds of the colormap, in the same units as the data.
If vmin
and vmax
are both None
, they are set at ± the
maximum absolute value of the data (yielding a colormap with midpoint
at 0). If only one of vmin
, vmax
is None
, will use
min(data)
or max(data)
, respectively. If callable, should
accept a NumPy array
of data and return a
float.
None
Colormap to use. If tuple, the first value indicates the colormap to use and the second value is a boolean defining interactivity. In interactive mode the colors are adjustable by clicking and dragging the colorbar with left and right mouse button. Left mouse button moves the scale up and down and right mouse button adjusts the range. Hitting space bar resets the range. Up and down arrows can be used to change the colormap. If None, ‘Reds’ is used for all positive data, otherwise defaults to ‘RdBu_r’. If ‘interactive’, translates to (None, True). Defaults to ‘RdBu_r’.
Warning
Interactive mode works smoothly only for a small amount of topomaps.
str
Add markers for sensor locations to the plot. Accepts matplotlib plot format string (e.g., ‘r+’ for red plusses). If True (default), circles will be used.
Plot a colorbar.
str
| None
Title to use.
Show figure if True.
dict
| None
The outlines to be drawn. If ‘head’, the default head scheme will be drawn. If ‘skirt’ the head scheme will be drawn, but sensors are allowed to be plotted outside of the head circle. If dict, each key refers to a tuple of x and y positions, the values in ‘mask_pos’ will serve as image mask. Alternatively, a matplotlib patch object can be passed for advanced masking options, either directly or as a function that returns patches (required for multi-axis plots). If None, nothing will be drawn. Defaults to ‘head’.
int
| array
of float
The number of contour lines to draw. If 0, no contours will be drawn. When an integer, matplotlib ticker locator is used to find suitable values for the contour thresholds (may sometimes be inaccurate, use array for accuracy). If an array, the values represent the levels for the contours. Defaults to 6.
str
The image interpolation to be used. Options are 'cubic'
(default)
to use scipy.interpolate.CloughTocher2DInterpolator
,
'nearest'
to use scipy.spatial.Voronoi
or
'linear'
to use scipy.interpolate.LinearNDInterpolator
.
Raw
| Epochs
| None
To be able to see component properties after clicking on component topomap you need to pass relevant data - instances of Raw or Epochs (for example the data that ICA was trained on). This takes effect only when running matplotlib in interactive mode.
float
Whether to plot standard deviation in ERP/ERF and spectrum plots. Defaults to True, which plots one standard deviation above/below. If set to float allows to control how many standard deviations are plotted. For example 2.5 will plot 2.5 standard deviation above/below.
dict
| None
Dictionary of arguments to plot_topomap
. If None, doesn’t pass any
additional arguments. Defaults to None.
dict
| None
Dictionary of arguments to plot_epochs_image
. If None, doesn’t pass
any additional arguments. Defaults to None.
dict
| None
Dictionary of arguments to psd_multitaper
. If None, doesn’t pass
any additional arguments. Defaults to None.
dict
| None
Allows to specify rejection parameters used to drop epochs (or segments if continuous signal is passed as inst). If None, no rejection is applied. The default is ‘auto’, which applies the rejection parameters used when fitting the ICA object.
float
| array-like | instance of ConductorModel
| None
| ‘auto’ | ‘eeglab’The sphere parameters to use for the head outline. Can be array-like of
shape (4,) to give the X/Y/Z origin and radius in meters, or a single float
to give just the radius (origin assumed 0, 0, 0). Can also be an instance
of a spherical ConductorModel
to use the origin and
radius from that object. If 'auto'
the sphere is fit to digitization
points. If 'eeglab'
the head circle is defined by EEG electrodes
'Fpz'
, 'Oz'
, 'T7'
, and 'T8'
(if 'Fpz'
is not present,
it will be approximated from the coordinates of 'Oz'
). None
(the
default) is equivalent to 'auto'
when enough extra digitization points
are available, and (0, 0, 0, 0.095) otherwise. Currently the head radius
does not affect plotting.
New in version 0.20.
Changed in version 1.1: Added 'eeglab'
option.
str
| int
| None
Control verbosity of the logging output. If None
, use the default
verbosity level. See the logging documentation and
mne.verbose()
for details. Should only be passed as a keyword
argument.
matplotlib.figure.Figure
| list
of matplotlib.figure.Figure
The figure object(s). Components are plotted on a grid with maximum dimensions of 5⨉4. If more than 20 components are plotted, a new figure will be created for each batch of 20, and a list of those figures will be returned.
Notes
When run in interactive mode, plot_ica_components
allows to reject
components by clicking on their title label. The state of each component
is indicated by its label color (gray: rejected; black: retained). It is
also possible to open component properties by clicking on the component
topomap (this option is only available when the inst
argument is
supplied).