我可以强制空DataFrame绘图吗?我填写xlim
和yticks
,我不明白为什么不可能。
>>> df
Empty DataFrame
Columns: [time, ch, 0]
Index: []
>>> df.plot(x="time", y="ch",
ax=ax,
...
xlim=(start, end),
yticks=range(ymin, ymax+1))
...
TypeError: Empty 'DataFrame': no numeric data to plot
还尝试使用matplotlib.pyplot
绘图,但如果我通过KeyError
则以ax
结束。
>>> plt.plot()
>>> plt.axes(ax)
...
KeyError: <matplotlib.axes._subplots.AxesSubplot object at 0x00000000060E6BE0>