Python pandas和matplotlib错误:';轴座';对象没有属性';rowNum';
我正在尝试使用带有matplotlib inset axis的pandas DataFrame绘制图形,但无法使其正常工作。这只发生在我将pandas软件包更新到版本0.16.2之后,现在我总是收到以下错误消息: “AxesHostAxes”对象没有属性“rowNum” 以下是我的代码:Python pandas和matplotlib错误:';轴座';对象没有属性';rowNum';,python,pandas,matplotlib,Python,Pandas,Matplotlib,我正在尝试使用带有matplotlib inset axis的pandas DataFrame绘制图形,但无法使其正常工作。这只发生在我将pandas软件包更新到版本0.16.2之后,现在我总是收到以下错误消息: “AxesHostAxes”对象没有属性“rowNum” 以下是我的代码: fig, ax = plt.subplots(figsize=(6,4)) mydata.plot(ax = ax, color = colors[1]) axins = inset
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])
mydata是一个数据帧。即使有错误消息,我也会得到下面的图表。有人知道如何解决这个问题吗?
我以前遇到过这样的问题,在这里找到了解决办法 尝试使用以下工具重新安装pandas:
sudo -H pip install pandas==0.15.2
我以前遇到过这样的问题,在这里找到了解决办法 尝试使用以下工具重新安装pandas:
sudo -H pip install pandas==0.15.2