Git Product home page Git Product logo

scplot's People

Contributors

joshua-gould avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

scplot's Issues

violin plot shuffles categorical keys

Categorical types get mixed up in violin plots. It's also visible in the notebook:

image

It doesn't happen in composition plots. I suspect it's because violin calls __fix_color_by_data_type and composition does not. Conversion to string in __fix_color_by_data_type might lead to the mixing.

This is also related to the PR #3 . I think if you outsource color assignment to scanpy, everything will be easier and cleaner on the scplot side.

3D scatterplots

This would be super cool. I saw that it's missing in hvplot (holoviz/hvplot#225) but how about using plotly for this? I know it wouldn't be visually consistent with bokeh but better than nothing, no?

import chart_studio.plotly as py
import plotly.express as px

import scanpy as sc
import pandas as pd

adata = sc.datasets.paul15()
sc.pp.normalize_total(adata, target_sum=10000)
sc.pp.log1p(adata)
sc.pp.neighbors(adata)
sc.tl.umap(adata, n_components=3)

df = pd.DataFrame(adata.obsm['X_umap'], columns=['x', 'y', 'z'])
df['gene'] = adata[:, 'Gata1'].X
fig = px.scatter_3d(df, x='x', y='y', z='z', color='gene', width=1600, height=1000)
py.iplot(fig) # more options here https://plot.ly/python/3d-scatter-plots/

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.