zwicker-group / py-pde

Python package for solving partial differential equations using finite differences.
https://py-pde.readthedocs.io
MIT License
409 stars 52 forks source link

PlotTracker doesn't show up on Jupyter notebook. #572

Closed icarosadero closed 1 month ago

icarosadero commented 3 months ago

When I try to use PlotTracker to keep plotting the state of the pde over time on a Jupyter notebook, it only shows the first plot. I am on version 0.40.0. Here's an example of how I am using it:

tracker = PlotTracker(interrupts="00:01:00", show=True)
sol = Diffuser(**params).solve(state, t_range=5000, dt=0.01, tracker=["progress", tracker])

The output:

  0%|          | 0/5000.0 [00:17<?, ?it/s]              
<Figure size 640x480 with 0 Axes>
  0%|          | 0.02/5000.0 [00:22<1569:07:49, 1129.78s/it]
<Figure size 640x480 with 0 Axes>
  0%|          | 0.06/5000.0 [00:22<527:52:23, 380.07s/it]  
<Figure size 640x480 with 0 Axes>
  0%|          | 0.81/5000.0 [00:26<45:09:07, 32.51s/it]  

The actual image isn't displayed.

david-zwicker commented 3 months ago

Looks like an incompatible version of some package. Could you please show us the output of the following code

import pde
pde.environment()

It might also help if you could specify the version of your jupyter environment and whether you're using jupyterlab, jupyter notebook (which version?) or any other method for displaying the notebooks.