Skip to content

Commit

Permalink
Merge pull request scverse#678 from fidelram/fix_components_all
Browse files Browse the repository at this point in the history
fix for scverse#677
  • Loading branch information
fidelram authored Jun 4, 2019
2 parents 2bb562c + beaa111 commit dc632e1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scanpy/plotting/_tools/scatterplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,10 @@ def _get_data_points(adata, basis, projection, components) -> Tuple[List[np.ndar
n_dims = 3

if components == 'all':
components = ['{},{}'.format(*((i, i+1) if i % 2 == 1 else (i+1, i)))
for i in range(1, adata.obsm['X_{}'.format(basis)].shape[1])]
from itertools import combinations
r_value = 3 if projection == '3d' else 2
_components_list = np.arange(adata.obsm['X_{}'.format(basis)].shape[1]) + 1
components = [",".join(map(str, x)) for x in combinations(_components_list, r=r_value)]

components_list = []
offset = 0
Expand Down

0 comments on commit dc632e1

Please sign in to comment.