Skip to content

Commit 1fce8f6

Browse files
Backport PR scverse#4059 on branch 1.12.x (docs: add inline example plot to sc.pl.correlation_matrix) (scverse#4066)
Co-authored-by: Ekin Kahraman <evk23umu@uea.ac.uk>
1 parent 1afb662 commit 1fce8f6

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/scanpy/plotting/_anndata.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,10 +1875,15 @@ def correlation_matrix( # noqa: PLR0912, PLR0913, PLR0915
18751875
18761876
Examples
18771877
--------
1878-
>>> import scanpy as sc
1879-
>>> adata = sc.datasets.pbmc68k_reduced()
1880-
>>> sc.tl.dendrogram(adata, "bulk_labels")
1881-
>>> sc.pl.correlation_matrix(adata, "bulk_labels")
1878+
Plot correlation matrix between cell type groups.
1879+
1880+
.. plot::
1881+
:context: close-figs
1882+
1883+
import scanpy as sc
1884+
adata = sc.datasets.pbmc68k_reduced()
1885+
sc.tl.dendrogram(adata, "bulk_labels")
1886+
sc.pl.correlation_matrix(adata, "bulk_labels")
18821887
18831888
"""
18841889
dendrogram_key = _get_dendrogram_key(adata, _dk(dendrogram), groupby)

0 commit comments

Comments
 (0)