Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/305.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/56.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python pandas和matplotlib错误:';轴座';对象没有属性';rowNum';_Python_Pandas_Matplotlib - Fatal编程技术网

Python pandas和matplotlib错误:';轴座';对象没有属性';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

我正在尝试使用带有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_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