Python.Plotting错误-需要在Python中绘制多个scatter_matrix

时间:2018-11-13 21:49:26

标签: python pandas plot

我需要一次绘制多个scatter_matrix图。请找到我使用的代码:

import pandas as pd
smallX = pd.read_csv('data.csv')

scart = ['tau1', 'tau2', 'tau3']
uni = ['tau4', 'tau5', 'tau6']
for q in scart:
    smallX.drop(q, axis=1, inplace=True)
smallXkeys=list(smallX.columns.values)
for i4 in smallXkeys:
    if (i4 == uni):
        smallX = pd.read_csv('data.csv')
            for q in scart:
                smallX.drop(q, axis=1, inplace=True)
            for t in smallXkeys:
                print("entered")
                smallX.drop(t, axis=1, inplace=True)
                pd.plotting.scatter_matrix(smallX, alpha=0.2, figsize=(15, 15), diagonal='kde')

我得到两个scatter_matrixes,但不超过两个。在中间,出现以下错误:

C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\axes\_base.py:3124: UserWarning: Attempting to set identical left==right results
in singular transformations; automatically expanding.
left=1.0, right=1.0
  'left=%s, right=%s') % (left, right))
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\axes\_base.py:3443: UserWarning: Attempting to set identical bottom==top results
in singular transformations; automatically expanding.
bottom=1.0, top=1.0
  'bottom=%s, top=%s') % (bottom, top))

如何解决此错误?

0 个答案:

没有答案