Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pl.violin will not take "hue" kwarg for seaborn? #1174

Open
auesro opened this issue Apr 21, 2020 · 1 comment
Open

pl.violin will not take "hue" kwarg for seaborn? #1174

auesro opened this issue Apr 21, 2020 · 1 comment
Labels
Area - Plotting 🌺 good first issue easy first issue to get started in OSS community contribution!

Comments

@auesro
Copy link

auesro commented Apr 21, 2020

Trying to make a violin plot adding the seaborn hue argument will result in ValueError.
In adata, 'timepoint' and 'replicate' are categorical adata.obs containing floats and ints, respectively. 'timepoint' is the age of the embryo from which cells were isolated (9.5, 10.5, etc) and 'replicate' the number of the replica (1, 2, 3).

sc.pl.violin(adata, 'n_genes', jitter=0.4, groupby = 'timepoint', stripplot=False, hue='replicate')
sc.pl.violin(adata, 'n_genes', jitter=0.4, groupby = 'timepoint', stripplot=False, hue='replicate')
Traceback (most recent call last):

  File "<ipython-input-5-756b321177a2>", line 1, in <module>
    sc.pl.violin(adata, 'n_genes', jitter=0.4, groupby = 'timepoint', stripplot=False, hue='replicate')

  File "/home/auesro/anaconda3/envs/Scanpy/lib/python3.7/site-packages/scanpy/plotting/_anndata.py", line 759, in violin
    **kwds,

  File "/home/auesro/anaconda3/envs/Scanpy/lib/python3.7/site-packages/seaborn/categorical.py", line 2393, in violinplot
    color, palette, saturation)

  File "/home/auesro/anaconda3/envs/Scanpy/lib/python3.7/site-packages/seaborn/categorical.py", line 559, in __init__
    self.establish_variables(x, y, hue, data, orient, order, hue_order)

  File "/home/auesro/anaconda3/envs/Scanpy/lib/python3.7/site-packages/seaborn/categorical.py", line 152, in establish_variables
    raise ValueError(err)

ValueError: Could not interpret input 'replicate'

Versions:

scanpy==1.4.6 anndata==0.7.1 umap==0.4.1 numpy==1.18.1 scipy==1.4.1 pandas==1.0.3 scikit-learn==0.22.2.post1 statsmodels==0.11.1 python-igraph==0.8.0

@auesro auesro added the bug label Apr 21, 2020
@giovp giovp added the good first issue easy first issue to get started in OSS community contribution! label Oct 9, 2020
@ivirshup ivirshup added enhancement and removed bug labels Apr 30, 2021
@kcArtemis
Copy link

Hey,can I look into this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area - Plotting 🌺 good first issue easy first issue to get started in OSS community contribution!
Projects
None yet
Development

No branches or pull requests

5 participants