scanpy.pl.MatrixPlot.style

MatrixPlot.style(cmap='viridis', edge_color='gray', edge_lw=0.1)

Modifies plot visual parameters.

Parameters
cmap : strstr (default: 'viridis')

String denoting matplotlib color map.

edge_color : str | Tuple[float, …] | NoneUnion[str, Tuple[float, …], None] (default: 'gray')

Edge color between the squares of matrix plot. Default is gray

edge_lw : float | NoneOptional[float] (default: 0.1)

Edge line width.

Returns

MatrixPlot

Examples

import scanpy as sc

adata = sc.datasets.pbmc68k_reduced()
markers = ['C1QA', 'PSAP', 'CD79A', 'CD79B', 'CST3', 'LYZ']

Change color map and turn off edges:

(
    sc.pl.MatrixPlot(adata, markers, groupby='bulk_labels')
    .style(cmap='Blues', edge_color='none')
    .show()
)
../../_images/scanpy-pl-MatrixPlot-style-2.png