首页 > 解决方案 > Matplotlib:如何只显示一个图形而不关闭其他图形?

问题描述

有没有可能做这样的事情

import matplotlib.pyplot as plt
fig_1, ax = plt.subplots()
ax.plot([1,2,2,3])
fig_2, ax = plt.subplots()
ax.plot([4,3,2,2])

fig_2.show()

在 Python 的 matplotlib 中?我只想显示fig_2而不必关闭fig_1

标签: pythonmatplotlibshow

解决方案


推荐阅读