Plot head positions. Parameters ---------- pos : ndarray, shape (n_pos, 10) | list of ndarray The head position data. Can also be a list to treat as a concatenation of runs. mode : str Can be 'traces' (default) to show position and quaternion traces,
(
pos,
mode="traces",
cmap="viridis",
direction="z",
*,
show=True,
destination=None,
info=None,
color="k",
axes=None,
totals=False,
)
| 121 | |
| 122 | @fill_doc |
| 123 | def plot_head_positions( |
| 124 | pos, |
| 125 | mode="traces", |
| 126 | cmap="viridis", |
| 127 | direction="z", |
| 128 | *, |
| 129 | show=True, |
| 130 | destination=None, |
| 131 | info=None, |
| 132 | color="k", |
| 133 | axes=None, |
| 134 | totals=False, |
| 135 | ): |
| 136 | """Plot head positions. |
| 137 | |
| 138 | Parameters |
| 139 | ---------- |
| 140 | pos : ndarray, shape (n_pos, 10) | list of ndarray |
| 141 | The head position data. Can also be a list to treat as a |
| 142 | concatenation of runs. |
| 143 | mode : str |
| 144 | Can be 'traces' (default) to show position and quaternion traces, |
| 145 | or 'field' to show the position as a vector field over time. |
| 146 | cmap : colormap |
| 147 | Colormap to use for the trace plot, default is "viridis". |
| 148 | direction : str |
| 149 | Can be any combination of "x", "y", or "z" (default: "z") to show |
| 150 | directional axes in "field" mode. |
| 151 | show : bool |
| 152 | Show figure if True. Defaults to True. |
| 153 | destination : path-like | array-like, shape (3,) | instance of Transform | None |
| 154 | The destination location for the head. See |
| 155 | :func:`mne.preprocessing.maxwell_filter` for details. |
| 156 | |
| 157 | .. versionadded:: 0.16 |
| 158 | %(info)s If provided, will be used to show the destination position when |
| 159 | ``destination is None``, and for showing the MEG sensors. |
| 160 | |
| 161 | .. versionadded:: 0.16 |
| 162 | color : color object |
| 163 | The color to use for lines in ``mode == 'traces'`` and quiver |
| 164 | arrows in ``mode == 'field'``. |
| 165 | |
| 166 | .. versionadded:: 0.16 |
| 167 | axes : array-like, shape (3, 2) or (4, 2) |
| 168 | The matplotlib axes to use. |
| 169 | |
| 170 | .. versionadded:: 0.16 |
| 171 | .. versionchanged:: 1.8 |
| 172 | Added support for making use of this argument when ``mode="field"``. |
| 173 | totals : bool |
| 174 | If True and in traces mode, show the total distance and angle in a fourth row. |
| 175 | |
| 176 | .. versionadded:: 1.9 |
| 177 | |
| 178 | Returns |
| 179 | ------- |
| 180 | fig : instance of matplotlib.figure.Figure |