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

fix display of MRI images in plot_mri_tensor_as_animation #456

Open
deflaux opened this issue Aug 18, 2021 · 2 comments
Open

fix display of MRI images in plot_mri_tensor_as_animation #456

deflaux opened this issue Aug 18, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@deflaux
Copy link
Collaborator

deflaux commented Aug 18, 2021

What
When using matplotlib 3.4 instead of 3.3 or older, the images displayed by ml4h.visualization_tools.hd5_mri_plots.plot_mri_tensor_as_animation display one after another instead of replacing the prior image. (The animation is no longer an animation.)

This appears to be due to https://matplotlib.org/stable/users/whats_new.html#changes-to-behavior-of-axes-creation-methods-gca-add-axes-add-subplot

How
Update the usage of matplot lib to correctly replace the images.

Acceptance Criteria
It appears as an animation again.

@deflaux deflaux added the bug Something isn't working label Aug 18, 2021
@deflaux deflaux self-assigned this Aug 18, 2021
@deflaux
Copy link
Collaborator Author

deflaux commented Sep 27, 2021

Note that %matplotlib notebook instead of %matplotlib inline sorta fixes it on Jupyter, but not on JupyterLab.

@deflaux
Copy link
Collaborator Author

deflaux commented Sep 28, 2021

Testing on newer Docker images for both Terra (e.g., #469) and GCP Notebooks fixes the issue.

So this was not due to a behavior change in matplotlib 3.4, but due to some bug fixed in a more recent Python package version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant