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 inverse method to ZScoreNorm to integrate with current matplotlib #871

Merged
merged 8 commits into from
Jan 20, 2023

Conversation

alex-l-kong
Copy link
Contributor

What is the purpose of this PR?

Closes #810. Pinning matplotlib to 3.4.2 is not a long-term solution for ensuring the colorbar scales properly.

How did you implement your changes

From matplotlib==3.5.0 onwards, an inverse method is explicitly required in a custom matplotlib.colors.Normalizer derived class for it to function properly. Additionally, we should fix the min and max at -3 and 3 respectively (and not using the min and max of the input data, as Zak was doing).

To this end, we can also remove the calibrate method and rely on just __call__ and inverse.

Remaining issues

We will need to make a new Docker release for this.

@alex-l-kong alex-l-kong self-assigned this Dec 17, 2022
…y num_boots to compute_topic_eda for gap_stat and gap_sds values
Copy link
Contributor

@cliu72 cliu72 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@alex-l-kong
Copy link
Contributor Author

@ngreenwald can you please help merge this one in, a minor coveralls issue is preventing that from happening.

Copy link
Member

@ngreenwald ngreenwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will require a new docker as well, lets wait to discuss

Copy link
Member

@ngreenwald ngreenwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

The new TMI requirements are not playing nicely with the matplotlib pin here I think

@srivarra
Copy link
Contributor

srivarra commented Jan 20, 2023

@ngreenwald Let me make a new release for TMI which'll consist of changes from angelolab/alpineer#17.

@alex-l-kong Try pinning tmi to v0.1.2.

@alex-l-kong
Copy link
Contributor Author

@ngreenwald looks like it works now with tmi==0.1.2.

@ngreenwald ngreenwald merged commit 6eaf5f8 into main Jan 20, 2023
@ngreenwald ngreenwald deleted the colorbar_scale branch January 20, 2023 20:41
@srivarra srivarra added the enhancement New feature or request label Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix metacluster remapping GUI colorbar scaling method to allow for later versions of matplotlib
4 participants