hv_anndata.plotting.scanpy.stacked_violin

hv_anndata.plotting.scanpy.stacked_violin(adata, /, xdim, ydim)

Stacked violin plot.

Groups data by xdim and ydim and then plots a single violin for each group.

Parameters:
adata AnnData

The AnnData object.

xdim AdDim

The x dimension.

ydim AdDim

The y dimension.

Return type:

GridSpace

Returns:

A GridSpace containing Violin objects.

Examples

import hv_anndata.plotting.scanpy as hv_sc
from hv_anndata import data, register, A

register()

adata = data.pbmc68k_processed()
markers = ["C1QA", "PSAP", "CD79A", "CD79B", "CST3", "LYZ"]
hv_sc.stacked_violin(
    adata[:, markers], A.var.index, A.obs["bulk_labels"]
).opts(hv.opts.Violin(aspect="square"))
/home/docs/.local/share/hatch/env/virtual/hv-anndata/STk7F69l/docs/lib/python3.13/site-packages/numba/cpython/hashing.py:477: UserWarning: FNV hashing is not implemented in Numba. See PEP 456 https://www.python.org/dev/peps/pep-0456/ for rationale over not using FNV. Numba will continue to work, but hashes for built in types will be computed using siphash24. This will permit e.g. dictionaries to continue to behave as expected, however anything relying on the value of the hash opposed to hash as a derived property is likely to not work as expected.
  warnings.warn(msg)
WARNING:param.ViolinPlot01112: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01115: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01118: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01121: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01124: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01127: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01130: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01133: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01136: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01139: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01142: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01145: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01148: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01151: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01154: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01157: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01160: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01163: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01166: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01169: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01172: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01175: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01178: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01181: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01184: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01187: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01190: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01193: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01196: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01199: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01202: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01205: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01208: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01211: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01214: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01217: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01220: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01223: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01226: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01229: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01232: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01235: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01238: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01241: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01244: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01247: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01250: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01253: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01256: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01259: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01262: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01265: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01268: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01271: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01274: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01277: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01280: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01283: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01286: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
WARNING:param.ViolinPlot01289: aspect value was ignored because absolute width and height values were provided. Either supply explicit frame_width and frame_height to achieve desired aspect OR supply a combination of width or height and an aspect value.
import hv_anndata.plotting.scanpy as hv_sc
from hv_anndata import data, register, A

register()

adata = data.pbmc68k_processed()
markers = ["C1QA", "PSAP", "CD79A", "CD79B", "CST3", "LYZ"]
hv_sc.stacked_violin(
    adata[:, markers], A.var.index, A.obs["bulk_labels"]
).opts(hv.opts.Violin(aspect="square"))
import hv_anndata.plotting.scanpy as hv_sc
from hv_anndata import data, register, A

register()

adata = data.pbmc68k_processed()
markers = ["C1QA", "PSAP", "CD79A", "CD79B", "CST3", "LYZ"]
hv_sc.stacked_violin(
    adata[:, markers], A.var.index, A.obs["bulk_labels"]
).opts(hv.opts.Violin(aspect="square"))
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']
WARNING:param.main: Option 'inner' for Violin type not valid for selected backend ('plotly'). Option only applies to following backends: ['bokeh', 'matplotlib']