Table Of Contents

Previous topic

misc.plot.mri

Next topic

misc.state

This content refers to the previous stable release of PyMVPA. Please visit www.pymvpa.org for the most recent version of PyMVPA and its documentation.

misc.plot.topo

Module: misc.plot.topo

Plot parameter distributions on a head surface (topography plots).

Functions

mvpa.misc.plot.topo.plotHeadOutline(scale=1, shift=(0, 0), color='k', linewidth='5', **kwargs)

Plots a simple outline of a head viewed from the top.

The plot contains schematic representations of the nose and ears. The size of the head is basically a unit circle for nose and ears attached to it.

Parameters:
  • scale (float) – Factor to scale the size of the head.
  • shift (2-tuple of floats) – Shift the center of the head circle by these values.
  • color (matplotlib color spec) – The color the outline should be plotted in.
  • linewidth (int) – Linewidth of the head outline.
  • **kwargs – All additional arguments are passed to pylab.plot().
Return type:

Matplotlib lines2D object

Returns:

can be used to tweak the look of the head outline.

mvpa.misc.plot.topo.plotHeadTopography(topography, sensorlocations, plotsensors=False, resolution=51, masked=True, plothead=True, plothead_kwargs=None, **kwargs)

Plot distribution to a head surface, derived from some sensor locations.

The sensor locations are first projected onto the best fitting sphere and finally projected onto a circle (by simply ignoring the z-axis).

Parameters:
  • topography (array) – A vector of some values corresponding to each sensor.
  • sensorlocations ((nsensors x 3) array) – 3D coordinates of each sensor. The order of the sensors has to match with the topography vector.
  • plotsensors (bool) – If True, sensor will be plotted on their projected coordinates. No sensor are shown otherwise.
  • plothead (bool) – If True, a head outline is plotted.
  • plothead_kwargs (dict) – Additional keyword arguments passed to plotHeadOutline().
  • resolution (int) – Number of surface samples along both x and y-axis.
  • masked (bool) – If True, all surface sample extending to head outline will be masked.
  • **kwargs – All additional arguments will be passed to pylab.imshow().
Return type:

(map, head, sensors)

Returns:

The corresponding matplotlib objects are returned if plotted, ie. if plothead is set to False, head will be None. map The colormap that makes the actual plot, a matplotlib.image.AxesImage instance. head What is returned by plotHeadOutline(). sensors The dots marking the electrodes, a matplotlib.lines.Line2d instance.