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
- conn
xarray.DataArray
|pandas.DataFrame
|numpy.ndarray
Either a 2D xarray.DataArray or a pandas DataFrame or a 2D NumPy array
- cmap
python:str
| ‘plasma’ Colormap name
- vmin, vmax
python: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_kw
python: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_title
python:str
|python:None
Colorbar title
- cbar_kw
python:dict
| {} Additional arguments for controlling the colorbar title (e.g. cbar_kw={‘fontweight’: ‘bold’, ‘fontsize’: 20})
- prop
python:float
|python:None
Proportion of edges to keep. For example, prop=5 means that 95th percentile will be used for thresholding the connections.
- bad
python:str
|python:None
Color of bad values in the connectivity matrix (nan or non-finite values). By default, pad pixels are transparent.
- xticklabels, yticklabels
python: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
- ax
matplotlib
Axes
|python:None
Matplotlib axis (to add to a subplot for example)
- conn
- Returns
- ax
matplotlib
Axes
Axes object with the heatmap
- ax