use*_*587 20 python matplotlib
我有一个对象fig2,它是一个类mathplotlib.axes.axessubplot,但是当我尝试执行fig2.show()时,python说axessubplot对象没有属性显示.如何显示AxesSubplot?
hel*_*ker 39
你应该调用matplotlib.pyplot.show(),这是一个显示所有数字的方法.
如果您已导入为plt,则:
import matplotlib.pyplot as plt
# create fig1 (of type plt.figure)
# create fig2
plt.show() # will display fig1 and fig2 in different windows
Run Code Online (Sandbox Code Playgroud)
Byt*_*hon 13
或者,您可以调用fig2的figure属性:
fig2.figure
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
24971 次 |
| 最近记录: |