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
str| ‘plasma’ Colormap name
- vmin, vmax
float|None Minimum and maximum of colorbar limits
- categoriesnumpy:array_like |
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
dict| {} Additional arguments to control the aesthetic of the categorical lines (e.g. categories_kw={‘color’: ‘orange’, ‘lw’: 4})
- cbarbool |
True Add the colorbar
- cbar_title
str|None Colorbar title
- cbar_kw
dict| {} Additional arguments for controlling the colorbar title (e.g. cbar_kw={‘fontweight’: ‘bold’, ‘fontsize’: 20})
- prop
float|None Proportion of edges to keep. For example, prop=5 means that 95th percentile will be used for thresholding the connections.
- bad
str|None Color of bad values in the connectivity matrix (nan or non-finite values). By default, pad pixels are transparent.
- xticklabels, yticklabels
str|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 |
True Make the axis square
- ax
matplotlibAxes|None Matplotlib axis (to add to a subplot for example)
- conn
- Returns:
- ax
matplotlibAxes Axes object with the heatmap
- ax