frites.plot.plot_conn_heatmap#

frites.plot.plot_conn_heatmap(conn, cmap='plasma', vmin=None, vmax=None, categories=None, categories_kw={}, cbar=True, cbar_title=None, cbar_kw={}, prop=None, bad=None, xticklabels='auto', yticklabels='auto', square=True, ax=None)[source]#

Plot the connectivity matrix as a heatmap.

Parameters
connxarray.DataArray | pandas.DataFrame | numpy.ndarray

Either a 2D xarray.DataArray or a pandas DataFrame or a 2D NumPy array

cmappython:str | ‘plasma’

Colormap name

vmin, vmaxpython:float | python:None

Minimum and maximum of colorbar limits

categoriesnumpy:array_like | python:None

Category associated to each region name. Can be hemisphere name, lobe name or indices describing group of regions. By default, an horizontal and a vertical lines are going to be plotted as a separation between categories (see argument below for controlling the aesthetic)

categories_kwpython:dict | {}

Additional arguments to control the aesthetic of the categorical lines (e.g. categories_kw={‘color’: ‘orange’, ‘lw’: 4})

cbarbool | python:True

Add the colorbar

cbar_titlepython:str | python:None

Colorbar title

cbar_kwpython:dict | {}

Additional arguments for controlling the colorbar title (e.g. cbar_kw={‘fontweight’: ‘bold’, ‘fontsize’: 20})

proppython:float | python:None

Proportion of edges to keep. For example, prop=5 means that 95th percentile will be used for thresholding the connections.

badpython:str | python:None

Color of bad values in the connectivity matrix (nan or non-finite values). By default, pad pixels are transparent.

xticklabels, yticklabelspython:str | python:None

Use ‘auto’ for the automatic settings of the x and y tick labels. Use an integer to decrease the number of ticks displayed. You can also disable the tick labels using False

squarebool | python:True

Make the axis square

axmatplotlib Axes | python:None

Matplotlib axis (to add to a subplot for example)

Returns
axmatplotlib Axes

Axes object with the heatmap