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

IMP: da-barplot should use consistant colors for enriched/depleted #137

Closed
colinbrislawn opened this issue Dec 8, 2024 · 3 comments · Fixed by #138
Closed

IMP: da-barplot should use consistant colors for enriched/depleted #137

colinbrislawn opened this issue Dec 8, 2024 · 3 comments · Fixed by #138

Comments

@colinbrislawn
Copy link
Contributor

Improvement Description
Make the color scheme consistent, even when all graphed features are only enriched or only depleted

Current Behavior
"enriched" and "depleted" are filled with in blue and orange, except when all features passing filter have the same sign, then they are all blue.

Proposed Behavior
The color scheme should be consistent (🟦 & 🟧 or whatever), even when all results have the same sign.

consistent with the other graphs in terms of color scheme for clarity

References
forum x-ref: https://forum.qiime2.org/t/ancombc-barplot-colors/32082

@SergioAlias
Copy link
Contributor

SergioAlias commented Dec 9, 2024

Hi! Not sure if this is the correct way of suggesting how to implement an improvement inside GitHub, but here I come:

I think this could be achieved making colors explicit when generating the Vega code.

Inside Layer -> Encoding -> Color, we can add the following:

"scale": {
  "domain": ["enriched", "depleted"],
  "range": ["blue", "orange"]
},

I'm not sure these orange and blue are the original tones though.

The forum x-ref mentioned in the OP contains an example of this.

@colinbrislawn
Copy link
Contributor Author

colinbrislawn commented Dec 11, 2024

Not sure if this is the correct way ... but here I come

I like code suggestions in issues! 👍
The other way is to fork the repo and open a PR. That's more work, but also more helpful!
(If that's something you want to try, this could be a good opportunity)
oh, you have made PRs before

@SergioAlias
Copy link
Contributor

I may have some spare time this week so I'll try!

@github-project-automation github-project-automation bot moved this to Backlog in 2025.4 🌻 Dec 12, 2024
@ebolyen ebolyen moved this from Backlog to Needs Review in 2025.4 🌻 Dec 12, 2024
@gregcaporaso gregcaporaso moved this from Needs Review to Completed in 2025.4 🌻 Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

2 participants