scverse / scverse/scanpy

Default legend when scaling dotplots

Open Beginner friendly
#3,576 1 comment 2 reactions 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

What kind of feature would you like to request?

Additional function parameters / changed functionality / changed defaults?

Please describe your wishes

Hi Team,

Thanks so much for this great tool; it's really useful in my work!

I noticed in a few publications that people scale their dotplots (sc.pl.dotplot) with standard_scale='var' using very few (or even only 2) groups, resulting in false interpretations about expression levels (they observe differences that are not meaningful). This is not always obvious to the reader because the sc.pl.dotplot function displays the 'mean expression in group' default color legend title even if the scaling argument is used. I would like to suggest changing the defaults here so that if the scaling argument is used, it says something different than "mean expression". Something like:

if self.standard_scale == 'var':
self.color_legend_title = 'scaled gene expression'

or

DEFAULT_SCALE_COLOR_LEGEND_TITLE = "Minmax scaled expression\nin group"

Thanks so much for all your help. I'm happy to explain this in more detail if needed.

Best,
Elias

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.dotplot implementation and trace how standard_scale and the color legend title are handled. Update the default legend wording for scaled plots while preserving the existing title for unscaled plots, then verify the legend output for both cases using the relevant dotplot tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.