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

changing colormap range #1696

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

changing colormap range #1696

wants to merge 2 commits into from

Conversation

moontrip
Copy link
Contributor

@moontrip moontrip commented Mar 21, 2023

This PR intends to resolve VEuPathDB/web-components#454. Made a mistake to resolve this in a very complex manner but later much simpler solution was found. Also, it is worth noting that while I was working on the colormap range, I noticed that the decimal points in the colormap's tick labels were often too long, so I have set it up to be 2 decimal points at a web-components PR, VEuPathDB/web-components#464. Finally, I found that seriesGradientColorscale was not typed so I also fixed it.

Two logics are currently utilized to find out the colormap range: a) no filter case: taking Min/Max between displayMin/Max and rangeMin/Max using the metadata of the overlay variable; b) with filter(s) (subsetted): taking Min/Max between computed data-based Min/Max and displayMin/Max from the metadata of the overlay variable. I saw that there is a work in progress to have a filter-aware metadata by Danielle, but it appeared to me that it is still underway.

Some screenshots are attached in the following (GEMS1 data): BMI-for-age-z-score has displayMin/Max of (-30, 20) and rangeMin/Max of (-15.3, 273.91).

a) No filter is used: in this case, range becomes (-30, 273.91)
scatter-colormap-withoutFilters

b) with filters: data-based Min/Max is (-11.05, 143.33)
scatter-colormap-withFilters

c) Age, matched case for the overlay variable with filters: Sequential colormap. No displayMin/Max; data-based Min/Max is (33, 56), thus final range becomes the data-based Min/Max
scatter-colormap-withFilters-sequential

@moontrip moontrip requested a review from bobular March 21, 2023 23:49
@bobular
Copy link
Member

bobular commented Mar 24, 2023

Hi @moontrip - will you make a new PR in the monorepo for this?

@bobular bobular removed their request for review November 6, 2023 10:28
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.

legend updates needed for divergent colormaps for continuous overlay variables
2 participants