Live plots don't update
Closed this issue · 7 comments
I'm trying python examples/advanced/island_model.py
but the live plots don't update. They're all white. I'm using Python 3.9.13 Windows, matplotlib 3.5.2, both with PyCharm and in a plain cmd window.
In PyCharm I at least get a first image but it doesn't update.
Same issues with the cgp.py example. I tried various things in leap_ec/probe.py
's CartesianPhenotypePlotProbe (confirmed with breakpoints) related to https://stackoverflow.com/questions/35215335/matplotlibs-ion-and-draw-not-working and https://stackoverflow.com/questions/24783530/python-realtime-plotting but couldn't get it working, so I'd appreciate help.
Hmm—I've noticed something similar on macOS that started happening a few months ago. But this may be different.
We mostly work on Linux, but maybe we can fire up a VM and help debug sometime in the next few weeks.
@DBraun Did you observe this issue with just the island model example(s), or do all LEAP examples that have live plots give you the same issue?
It's all of the ones with plotting such as examples/simple/*
Okay, putting this one next in my queue.
My first steps will be to
- set up a Windows VM so I can reproduce locally;
- then I'll compare to similar observations colleagues have made on macOS,
- and see if the fix I had fiddled with a few months ago on my local for macOS works, and whether it solves both issues or we have two independent bugs.
I've failed to reproduce this issue on Windows 11. Running in VS Code with Python 3.10 installed from the Windows Store. I checked both master
and develop
branches. I encountered some other issues (opened #237 and #238), but the plots update in real time.
@DBraun We could try to isolate the difference between your and my environment.
- I had 3.10, you had 3.9
- I had Windows 11—did you have Windows 10?
- I had Python from the Windows Store—did you have a different Python distribution?
I had 3.9 from python.org on Windows 11. I’ll see if I can retest and then test 3.10 sometime.
Closing this for the time being since we've been unable to reproduce it—happy to revisit it if and when we get more info!