xcp_d.utils.plotting.plot_carpet
- xcp_d.utils.plotting.plot_carpet(func, atlaslabels=None, detrend=True, size=(950, 800), labelsize=30, subplot=None, output_file=None, legend=True, TR=None, lut=None, colorbar=False)[source]
Plot an image representation of voxel intensities across time.
This is also known as the “carpet plot” or “Power plot”. See Jonathan Power Neuroimage 2017 Jul 1; 154:150-158.
- Parameters:
func (
str
) – Path to NIfTI or CIFTI BOLD imageatlaslabels (numpy.ndarray, optional) – A 3D array of integer labels from an atlas, resampled into
img
space. Required iffunc
is a NIfTI image. Unused iffunc
is a CIFTI.detrend (bool, optional) – Detrend and standardize the data prior to plotting.
size (tuple, optional) – Size of figure.
labelsize (int, optional)
subplot (matplotlib Subplot, optional) – Subplot to plot figure on.
output_file (
str
or None, optional) – The name of an image file to export the plot to. Valid extensions are .png, .pdf, .svg. If output_file is not None, the plot is saved to a file, and the display is closed.legend (bool) – Whether to render the average functional series with
atlaslabels
as overlay.TR (float, optional) – Specify the TR, if specified it uses this value. If left as None, # of frames is plotted instead of time.
lut (numpy.ndarray, optional) – Look up table for segmentations
colorbar (bool, optional) – Default is False.