2016-06-21 3 views
0

私はSeabornのJointGrid関数を使用して各次元のヒストグラム(右上と右上)を散布図に描画しようとしています。Python Seaborn JointGrid IndexError

A非常に基本的な例:私は次のバージョンがインストールされている

--------------------------------------------------------------------------- 
IndexError        Traceback (most recent call last) 
<ipython-input-3-42ac8946b390> in <module>() 
     1 x = np.random.rand(100) 
     2 y = np.random.rand(100) 
----> 3 sns.jointplot(x, y, color='r') 
     4 

/usr/local/lib/python2.7/site-packages/seaborn/distributions.pyc in jointplot(x, y, data, kind, stat_func, color, size, ratio, space, dropna, xlim, ylim, joint_kws, marginal_kws, annot_kws, **kwargs) 
    796  grid = JointGrid(x, y, data, dropna=dropna, 
    797      size=size, ratio=ratio, space=space, 
--> 798      xlim=xlim, ylim=ylim) 
    799 
    800  # Plot the data using the grid 

/usr/local/lib/python2.7/site-packages/seaborn/axisgrid.pyc in __init__(self, x, y, data, size, ratio, space, dropna, xlim, ylim) 
    1640   # Turn off the ticks on the density axis for the marginal plots 
    1641   plt.setp(ax_marg_x.yaxis.get_majorticklines(), visible=False) 
-> 1642   plt.setp(ax_marg_x.yaxis.get_minorticklines(), visible=False) 
    1643   plt.setp(ax_marg_y.xaxis.get_majorticklines(), visible=False) 
    1644   plt.setp(ax_marg_y.xaxis.get_minorticklines(), visible=False) 

/usr/local/lib/python2.7/site-packages/matplotlib/pyplot.pyc in setp(*args, **kwargs) 
    348 @docstring.copy(_setp) 
    349 def setp(*args, **kwargs): 
--> 350  return _setp(*args, **kwargs) 
    351 
    352 

/usr/local/lib/python2.7/site-packages/matplotlib/artist.pyc in setp(obj, *args, **kwargs) 
    1553   objs = list(cbook.flatten(obj)) 
    1554 
-> 1555  insp = ArtistInspector(objs[0]) 
    1556 
    1557  # file has to be popped before checking if kwargs is empty 

IndexError: list index out of range 

numpyの1.12.0.dev0 + cc51ba8しかし

import numpy as np 
import matplotlib.pyplot as plt 
import seaborn as sns 

x = np.random.rand(100) 
y = np.random.rand(100) 
sns.jointplot(x, y, color='r') 

、私は次はIndexErrorを取得します

Matplotlib 1.5.2rc2 + 1938.g4ba20b8

シーボーン0.7.1

ここで何が起こっているかについては、本当に感謝しています。ありがとう!

+0

'numpy 1.10.4'、' matplotlib 1.5.1'、 'seaborn 0.7.0'でうまく動作します。 – lanery

+0

ええ、それは私のために働いていた、突然停止し、私はなぜエラーメッセージに基づいて理解していない... – arjology

答えて

0

私はMatplotlib 1.5.1にダウングレードしました。おそらくrc2バージョンの何らかのエラー?