scvelo.pl.hist

scvelo.pl.hist(arrays, alpha=0.5, bins=50, color=None, colors=None, labels=None, hist=None, kde=None, bw_method=None, xlabel=None, ylabel=None, xlim=None, ylim=None, cutoff=None, xscale=None, yscale=None, xticks=None, yticks=None, fontsize=None, legend_fontsize=None, figsize=None, normed=None, perc=None, exclude_zeros=None, axvline=None, axhline=None, pdf=None, ax=None, dpi=None, show=True, **kwargs)

Plot a histogram.

arrays:list or array (default [‘royalblue’, ‘white’, ‘forestgreen’])

List of colors, either as names or rgb values.

alpha: list, np.ndarray or None (default: None)

Alpha of the colors. Must be same length as colors.

binsint or sequence (default: 50)

If an integer is given, bins + 1 bin edges are calculated and returned, consistent with numpy.histogram. If bins is a sequence, gives bin edges, including left edge of first bin and right edge of last bin. In this case, bins is returned unmodified.

colors:list or array (default [‘royalblue’, ‘white’, ‘forestgreen’])

List of colors, either as names or rgb values.

labelsstr or None (default: None)

String, or sequence of strings to label clusters.

hist: bool or None (default: None)

Whether to show histogram.

kde: bool or None (default: None)

Whether to use kernel density estimation on data.

bw_methodstr, scalar or callable, (default: None)

The method used to calculate the estimator bandwidth. This can be ‘scott’, ‘silverman’, a scalar constant or a callable. If a scalar, this will be used directly as kde.factor. If a callable, it should take a gaussian_kde instance as only parameter and return a scalar. If None (default), nothing happens; the current kde.covariance_factor method is kept.

xlabel: str (default: None)

Label of x-axis.

ylabel: str (default: None)

Label of y-axis.

xlim: tuple, e.g. [0,1] or None (default: None)

Restrict x-limits of the axis.

ylim: tuple, e.g. [0,1] or None (default: None)

Restrict y-limits of the axis.

cutoff: tuple, e.g. [0,1] or float or None (default: None)

Bins will be cut off below and above the cutoff values.

xscale: log or None (default: None)

Scale of the x-axis.

yscale: log or None (default: None)

Scale of the y-axis.

fontsize: float (default: None)

Label font size.

legend_fontsize: int (default: None)

Legend font size.

figsize: tuple (default: (7,5))

Figure size.

normed: bool or None (default: None)

Whether to normalize data.

perc: tuple, e.g. [2,98] (default: None)

Specify percentile for continuous coloring.

exclude_zeros: bool or None (default: None)

Whether to exclude zeros in data for the kde and hist plot.

axvline: float or None (default: None)

Plot a vertical line at the specified x-value.

axhline float or None (default: None)

Plot a horizontal line at the specified y-value.

pdf: str or None (default: None)

probability density function to be fitted, e.g., ‘norm’, ‘t’, ‘chi’, ‘beta’, ‘gamma’, ‘laplace’ etc.

ax: matplotlib.Axes, optional (default: None)

A matplotlib axes object. Only works if plotting a single component.

dpi: int (default: 80)

Figure dpi.

show: bool, optional (default: None)

Show the plot, do not return axis.

Returns

If show==False a matplotlib.Axis