brainglobe / brainglobe-heatmap

Rendering anatomical heatmaps with brainrender and matplotlib
https://brainglobe.info
MIT License
34 stars 10 forks source link

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

Closed samclothier closed 7 months ago

samclothier commented 7 months ago

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:

codecov[bot] commented 7 months ago

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 :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #33 +/- ## ===================================== Coverage 0.00% 0.00% ===================================== Files 5 5 Lines 285 285 ===================================== Misses 285 285 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.