MCPcopy
hub / github.com/mne-tools/mne-python / plot_cov

Function plot_cov

mne/viz/misc.py:111–256  ·  view source on GitHub ↗

Plot Covariance data. Parameters ---------- cov : instance of Covariance The covariance matrix. %(info_not_none)s exclude : list of str | str List of channels to exclude. If empty do not exclude any channel. If 'bads', exclude info['bads']. colorbar :

(
    cov,
    info,
    exclude=(),
    colorbar=True,
    proj=False,
    show_svd=True,
    show=True,
    verbose=None,
)

Source from the content-addressed store, hash-verified

109
110@verbose
111def plot_cov(
112 cov,
113 info,
114 exclude=(),
115 colorbar=True,
116 proj=False,
117 show_svd=True,
118 show=True,
119 verbose=None,
120):
121 """Plot Covariance data.
122
123 Parameters
124 ----------
125 cov : instance of Covariance
126 The covariance matrix.
127 %(info_not_none)s
128 exclude : list of str | str
129 List of channels to exclude. If empty do not exclude any channel.
130 If 'bads', exclude info['bads'].
131 colorbar : bool
132 Show colorbar or not.
133 proj : bool
134 Apply projections or not.
135 show_svd : bool
136 Plot also singular values of the noise covariance for each sensor
137 type. We show square roots ie. standard deviations.
138 show : bool
139 Show figure if True.
140 %(verbose)s
141
142 Returns
143 -------
144 fig_cov : instance of matplotlib.figure.Figure
145 The covariance plot.
146 fig_svd : instance of matplotlib.figure.Figure | None
147 The SVD plot of the covariance (i.e., the eigenvalues or "matrix spectrum").
148
149 See Also
150 --------
151 mne.compute_rank
152
153 Notes
154 -----
155 For each channel type, the rank is estimated using
156 :func:`mne.compute_rank`.
157
158 .. versionchanged:: 0.19
159 Approximate ranks for each channel type are shown with red dashed lines.
160 """
161 import matplotlib.pyplot as plt
162 from matplotlib.colors import Normalize
163
164 from ..cov import Covariance
165
166 info, C, ch_names, idx_names = _index_info_cov(info, cov, exclude)
167 del cov, exclude
168

Callers 1

_add_covMethod · 0.85

Calls 11

_index_info_covFunction · 0.85
make_projectorFunction · 0.85
_safe_svdFunction · 0.85
CovarianceClass · 0.85
pick_infoFunction · 0.85
compute_rankFunction · 0.85
plt_showFunction · 0.85
infoMethod · 0.80
sqrtMethod · 0.80
_unlockMethod · 0.80
plotMethod · 0.45

Tested by

no test coverage detected