ehrapy.plot.missing_values_heatmap(adata, filter=None, max_cols=0, max_percentage=0, sort=None, figsize=(20, 12), fontsize=16, labels=True, label_rotation=45, cmap='RdBu', vmin=-1, vmax=1, cbar=True, categoricals=False)[source]#

Presents a seaborn heatmap visualization of nullity correlation in the given AnnData object.

Note that this visualization has no special support for large datasets. For those, try the dendrogram instead.

  • adata (AnnData) – AnnData object object containing all observations.

  • filter (str | None) – The filter to apply to the heatmap. Should be one of “top”, “bottom”, or None. Defaults to None .

  • max_cols (int) – The max number of columns from the AnnData object to include.

  • max_percentage (float) – The max percentage fill of the columns from the AnnData object.

  • sort (str | None) – The row sort order to apply. Can be “ascending”, “descending”, or None.

  • figsize (tuple) – The size of the figure to display.

  • fontsize (float) – The figure’s font size.

  • labels (bool) – Whether or not to display the column names.

  • label_rotation (float) – What angle to rotate the text labels to.

  • cmap (str) – What matplotlib colormap to use.

  • vmin (int) – The normalized colormap threshold.

  • vmax (int) – The normalized colormap threshold.

  • cbar (bool) – Whether to draw a colorbar.

  • categoricals (bool) – Whether to include “ehrapycat” columns to the plot.


The plot axis.


>>> import ehrapy as ep
>>> adata =
>>>, filter="bottom", max_cols=15, max_percentage=0.999)