【发布时间】:2022-01-26 07:52:38
【问题描述】:
我在 Pygame 中有一个用于游戏的 AI,我想创建一个图表来跟踪演变。
我只需要 X 轴上的 Gen 和 Y 轴上的 Points。
我已经尝试过了,但我不知道如何让它适合游戏中的表面,而不是作为单独的窗口弹出(最终会停止游戏)
import matplotlib.pyplot as plt
plt.plot(Generation=[], Points=[])
plt.title('Points per Generation')
plt.xlabel('Generation')
plt.ylabel('Points')
plt.show()
有什么想法吗?
【问题讨论】:
标签: python matplotlib pygame pygame-surface