brainglobe / brainrender

a python based software for visualization of neuroanatomical and morphological data.
https://brainglobe.info/documentation/brainrender/index.html
BSD 3-Clause "New" or "Revised" License
538 stars 75 forks source link

User-specified colormap in PointsDensity #325

Closed GuillaumeLeGoc closed 7 months ago

GuillaumeLeGoc commented 7 months ago

Description

What is this PR

Why is this PR needed? NA

What does this PR do? Allows the user to specify a colormap for the points density feature.

References

https://github.com/brainglobe/brainrender/issues/323

How has this PR been tested?

I ran examples/cell_density.py example, https://github.com/brainglobe/brainrender/blob/980a76fee9796595561f99e760083cafea09f62d/examples/cell_density.py#L42

using scene.add(PointsDensity(coordinates, colors="inferno")) instead.

Is this a breaking change?

I hope not

Does this PR require an update to the documentation?

The PointsDensity is not documented in the documentation, so NA. We could add the colormap option in the example.

Checklist:

Notes

I'm unfamiliar with (read : I don't know anything about) tests and pre-commits, so I didn't do those. I used ruff to format my addition in VSCode, but that's about it.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (980a76f) 86.39% compared to head (9283ce8) 86.39%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #325 +/- ## ======================================= Coverage 86.39% 86.39% ======================================= Files 26 26 Lines 1213 1213 ======================================= Hits 1048 1048 Misses 165 165 ```

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