lib5c.plotters.correlation module¶
Module for plotting pairwise correlation matrices.
-
lib5c.plotters.correlation.
plot_correlation_matrix
(matrix, label_values=None, cluster=False, cbar=False, cmap='rocket_r', colorscale=None, despine=False, style='dark', **kwargs)[source]¶ Plots a pairwise corrrelation matrix as a heatmap.
- Parameters
matrix (np.ndarray) – The pairwise correlation matrix to visualize.
label_values (Optional[List[str]]) – A list of strings labeling the columns of the matrix. If not passed, no labels will be included.
cluster (bool) – Pass True to perform heirarchical clustering on the rows and columns of the matrix.
cbar (bool) – Pass True to include a colorbar.
cmap (matplotlib colormap) – Choose the colormap to use in the heatmap.
colorscale (Optional[Tuple[int]]) – Pass a colorscale to use for the plot.
kwargs (kwargs) – Typical plotter kwargs.
- Returns
The axis plotted on.
- Return type
pyplot axis