brainglobe / brainglobe-heatmap

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

Add ax arg to plot method #44

Closed RobertoDF closed 3 months ago

RobertoDF commented 5 months ago

I would like to be able to do something like this:


fig, axs = plt.subplots(1,3, figsize=(15,4))
for ax, d in zip(axs,[8800, 9300, 9700]):
    scene = bgh.Heatmap(
        regions,
        position=(d),
        orientation="frontal",  # or 'sagittal', or 'horizontal' or a tuple (x,y,z)
        thickness=10,
        title="frontal",
        format="2D",
    )
    scene.plot(ax=ax)
Screenshot 2024-05-30 at 15 38 22

Is there a better way to achieve this?

Thanks!

Checklist:

codecov[bot] commented 5 months ago

Codecov Report

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

Project coverage is 0.00%. Comparing base (8d45490) to head (e8610a2). Report is 16 commits behind head on main.

Files Patch % Lines
brainglobe_heatmap/heatmaps.py 0.00% 13 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #44 +/- ## ===================================== Coverage 0.00% 0.00% ===================================== Files 5 5 Lines 279 284 +5 ===================================== - Misses 279 284 +5 ```

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

IgorTatarnikov commented 3 months ago

Done and done! I think this is good to merge.