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

✨ Add colorblocks to baseplot similar to heatmap #3043

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mbuttner
Copy link
Contributor

@mbuttner mbuttner commented May 2, 2024

Hi there,
I wrote a color annotation function for the Baseplot class called add_colorblocks(), which borrows some functionality of the add_totals() function and creates a colorblock for the annotation each assigned group.

sc.pl.dotplot(adata, ["CD79A", "MS4A1"], "bulk_labels", return_fig=True, show=False,
                   #swap_axes=True
                   ).add_colorblocks(color='Paired', size=0.1).show()

image

  • [ x] Release notes not necessary because: tbd

Copy link

codecov bot commented May 2, 2024

Codecov Report

Attention: Patch coverage is 47.72727% with 23 lines in your changes are missing coverage. Please review.

Project coverage is 76.18%. Comparing base (0d4554b) to head (efcf8df).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3043      +/-   ##
==========================================
- Coverage   76.27%   76.18%   -0.10%     
==========================================
  Files         117      117              
  Lines       12795    12838      +43     
==========================================
+ Hits         9760     9780      +20     
- Misses       3035     3058      +23     
Files Coverage Δ
scanpy/plotting/_baseplot_class.py 85.21% <47.72%> (-4.68%) ⬇️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant