I have an anndata called violin_adata like this:
AnnData object with n_obs 脳 n_vars = 2995 脳 10
obs: 'louvain'
All values in this adata is between 0 and 1; however when I plot the violin plot, it gets the scales to negative or 2. What should I adjust?
ax = sc.pl.stacked_violin(violin_adata, genes,
groupby='louvain',dendrogram=True,swap_axes=True)

Hey!
It looks like this might be due to the kde. You could pass cut=0 to ensure the kde doesn't go past 0. It will however look less nice then. But that is just a limitation of kernel density estimation I guess...
Curiously, in one of my latest PR (https://github.com/theislab/scanpy/pull/661) I set cut=0 as default to
address this issue. From what I see, this is the default also for Seurat.
Most helpful comment
Hey!
It looks like this might be due to the kde. You could pass
cut=0to ensure the kde doesn't go past 0. It will however look less nice then. But that is just a limitation of kernel density estimation I guess...