我尝试使用pandas DataFrame和matplotlib inset axis绘制图形,但无法使其工作。这只发生在我将pandas包更新到0.16.2版本之后,现在我总是收到以下错误消息:
“AxesHostAxes”对象没有属性“rowNum”
以下是我的代码:
fig, ax = plt.subplots(figsize=(6,4))
mydata.plot(ax = ax, color = colors[1])
axins = inset_axes(ax,
width="55%", # width = 30% of parent_bbox
height="50%", # height : 1 inch
loc = 4,
)
mydata[:151].plot(ax = axins, color = colors[1])
我以前遇到过这样的问题,在这里找到了解决办法github_issue
尝试重新安装熊猫:
相关问题 更多 >
编程相关推荐