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

settings.ROOT_COLOR changes 2D plots in addition to 3D brainrender plots #33

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

samclothier
Copy link

Description

What is this PR

Usability improvement

Why is this PR needed?

I found myself wanting to change the root colour for the 2D matplotlib plots. This was especially useful when using a Greys (B-W) colourmap, as the grey background can make some regions invisible.

What does this PR do?

Currently the root region setting appears to only control the root region colour in the 3D brainrender plots. To me it would be intuitive to have the 2D matplotlib plots also read this value so that it only need be set once at the top of the file.

How has this PR been tested?

Externally, I am now able to do something like bgh.heatmaps.settings.ROOT_COLOR = white and have this produce the 2D brain image with a white background.

Does this PR require an update to the documentation?

Unsure.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

Copy link

codecov bot commented Apr 4, 2024

Codecov Report

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

Project coverage is 0.00%. Comparing base (d621e52) to head (a2cde7f).
Report is 10 commits behind head on main.

Files Patch % Lines
brainglobe_heatmap/heatmaps.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main     #33   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          5       5           
  Lines        285     285           
=====================================
  Misses       285     285           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@alessandrofelder alessandrofelder left a comment

Choose a reason for hiding this comment

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

Thanks @samclothier. I think for now no updates to the docs are needed, given that there's quite a bit yet to be documented here. And this actually, as you say, makes things more self-consistent - which is great.

@alessandrofelder alessandrofelder merged commit fe89839 into brainglobe:main Apr 4, 2024
12 checks passed
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.

2 participants