scverse / scverse/scanpy

feature request: double legend position in sc.pl.umap

Open
#2,112 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area - Plotting 🌺
Dominant language
Python
Stars
2.6k
Forks
779
Avg merge
1d 4h
Merged PRs (30d)
27

Description

  • Additional function parameters / changed functionality / changed defaults?

...

Hi scanpy team

Thank you for the excellent package! I would like to request a new legend_loc parameter for the sc.pl.umap function.

If sc.pl.umap could plot the cluster names on the "right margin", but at the same time assign a number to each cluster and plot that number "on data", we should be able to distinguish the clusters better.. Currently the labels sometimes take up too much of space when I put the legend "on data". On the other hand the the colors get confusing for >15 clusters clusters if I put the legend on "right margin".

Best,
Vivek

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the sc.pl.umap entry point and inspect how its current legend_loc options place cluster labels. Determine how to support both right-margin names and numbered labels on the data, then verify that the existing legend modes still work and that the new combined behavior distinguishes clusters clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics, data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.