matplotlib 动画 numpy-2D-arrays

问题描述 投票:0回答:0

我最近选择了 Python 并使用 numpy-arrays 编写了生命游戏(成功)。但是我在绘制它们时确实遇到了问题。我可以绘制一个数组,但不知道如何尽可能多地更新当前 matplotlib-window 中的绘图。

给定:计算下一代的函数(获取 npArray 并给出 npArray),启动网格(npArray)

(Python3.9)

我正在为使用 while 循环搜索一个简单的解决方案而苦恼,它不会为每次迭代打开一个新窗口。不可能那么难。谁能帮忙? (我知道这是:Matplotlib: Animate 2D Array 但这不起作用)

python matplotlib tkinter pygame numpy-ndarray
© www.soinside.com 2019 - 2024. All rights reserved.