Skip to content

tiny-plot: consistent color assignment across classes, detail improvements in legend and codebase#220

Merged
taimontgomery merged 1 commit intomasterfrom
issue-219
Aug 4, 2022
Merged

tiny-plot: consistent color assignment across classes, detail improvements in legend and codebase#220
taimontgomery merged 1 commit intomasterfrom
issue-219

Conversation

@AlexTate
Copy link
Member

@AlexTate AlexTate commented Aug 3, 2022

Improvements in sample_avg_scatter_by_dge* plots:

  • Color assignment for classes is now consistent across samples
  • The legend is now (properly) sorted alphabetically rather than by group size
  • Groups are still plotted in descending order of size so that the least abundant classes are plotted on top
  • If the number of groups exceeds the number of colors in the stylesheet, tiny-plot will switch to a 20 item color map. The color map will repeat if more than 20 groups need to be plotted.

The code in plotterlib.scatter_grouped() has been refined, and the code in plotter.scatter_dge() has been slightly simplified.

Closes #219

…s color assignment so that colors are consistent across samples. This method and its signature have been cleaned up a bit. This has helped simplify plotter.scatter_dges() as well

tiny-plot will also fail over to a 20 item colormap if the number of groups exceeds the number of colors defined in the user's stylesheet. Categorical color maps over 20 items aren't offered by MPL, but if needed the map will repeat as necessary
@AlexTate AlexTate requested a review from taimontgomery August 3, 2022 22:30
@AlexTate
Copy link
Member Author

AlexTate commented Aug 3, 2022

This PR is ready to be merged but PR #214 needs to be merged first

@AlexTate AlexTate changed the base branch from master to classify-counter August 4, 2022 16:57
@AlexTate AlexTate changed the base branch from classify-counter to master August 4, 2022 16:57
@AlexTate AlexTate marked this pull request as ready for review August 4, 2022 17:00
@taimontgomery taimontgomery merged commit 2e4c2be into master Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tiny-plot: make class group colors consistent across samples in scatter_dge_class

2 participants