Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/312.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 熊猫群居箱线图上的轴虫_Python_Matplotlib_Pandas - Fatal编程技术网

Python 熊猫群居箱线图上的轴虫

Python 熊猫群居箱线图上的轴虫,python,matplotlib,pandas,Python,Matplotlib,Pandas,my Pandas数据帧的头部,df,如下所示: count1 count2 totalcount season 0 3 13 16 1 1 8 32 40 1 2 5 27 32 1 3 3 10 13 1 4 0 1 1

my Pandas数据帧的头部,
df
,如下所示:

  count1  count2  totalcount  season
0       3      13          16       1
1       8      32          40       1
2       5      27          32       1
3       3      10          13       1
4       0       1           1       1
我想制作
count1
count2
totalcount
的箱线图,按
季节(有4个季节)分组,并让每组箱线图显示在单个图形中各自的子地块上

当我只使用两列时,比如说
count1
count2
,一切看起来都很棒

df.boxplot(['count1', 'count2'], by='season')

但是,当我将
totalcount
添加到混合中时,轴限制就失控了

df.boxplot(['count1', 'count2', 'totalcount'], by='season')

这种情况的发生与列的顺序无关。我意识到有几种方法可以解决这个问题,但是如果这种方法能够正常工作,会方便得多

我错过什么了吗?这是熊猫身上已知的虫子吗?我在我的第一次熊猫虫子报告中找不到任何东西


我正在使用Pandas 0.14.0和matplotlib 1.3.1。

您是否尝试升级Pandas/matplotlib软件包

我使用的是Pandas 0.13.1+Matplotlib 1.2.1,这是我得到的图:

In [31]: df
Out[34]: 
    count1  count2  totalcount  season
0        3      13          16       1
1        8      32          40       1
2        5      27          32       1
3        3      10          13       1
4        0       1           1       1
5        3      13          16       2
6        8      32          40       2
7        5      27          32       3
8        3      10          13       3
9        0       1           1       4
10       3      10          13       4
11       3      13          16       4

[12 rows x 4 columns]


有趣-我实际上使用的是Pandas 0.14.0和matplotlib 1.3.1。@Greg,真的。我升级到了你的版本,问题就在那里。