met*_*eto 5 python plot pandas
我有一个脚本(不是 IPython 笔记本),它在最后生成一个图(通过 pandas DataFrame)。我的问题是没有显示这样的情节。
灵感来自这个我已经试过
fig, ax = plt.subplots()
my_dataframe.plot(ax=ax)
ax.show()
Run Code Online (Sandbox Code Playgroud)
这不起作用。我可以展示我的情节的唯一方法是:
plt.figure()
my_dataframe.plot()
plt.show()
Run Code Online (Sandbox Code Playgroud)
但这也带来了一个我不想拥有的空洞数字。
你试过了吗
fig, ax = plt.subplots()
my_dataframe.plot(ax=ax)
plt.show() # plt in place of ax
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2209 次 |
| 最近记录: |