ehrapy.plot.missing_values_barplot#
- ehrapy.plot.missing_values_barplot(adata, log=False, filter=None, max_cols=0, max_percentage=0, sort=None, figsize=None, color='dimgray', fontsize=16, labels=None, label_rotation=45, orientation=None, categoricals=False)[source]#
A bar chart visualization of the nullity of the given AnnData object.
- Parameters:
adata (
AnnData
) –AnnData
object object containing all observations.log (
bool
) – Whether or not to display a logarithmic plot.filter (
Optional
[str
]) – The filter to apply to the barplot. 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 (
Optional
[str
]) – The row sort order to apply. Can be “ascending”, “descending”, or None.figsize (
Optional
[tuple
]) – The size of the figure to display.color (
str
) – The color of the filled columns.fontsize (
float
) – The figure’s font size.labels (
Optional
[str
]) – Whether or not to display the column names.label_rotation (
float
) – What angle to rotate the text labels to.orientation (
Optional
[str
]) – The way the bar plot is oriented.categoricals (
bool
) – Whether to include “ehrapycat” columns to the plot.
- Returns:
The plot axis.
Examples
>>> import ehrapy as ep >>> adata = ep.data.mimic_2(encoded=True) >>> ep.pl.missing_values_barplot(adata, filter='bottom', max_cols=15, max_percentage=0.999)
- Preview: