我有一個熊貓數據框pandas_df與6輸入列:column_1, column_2, ... , column_6
,和一個結果列result
。現在我用下面的代碼繪製每兩個輸入列對的散點圖(所以我有6 * 5/2 = 15個數字)。我做了下面的代碼15次,每次都產生了一個大數字。matplotlib:繪製多個小數字在一個大的陰謀
我想知道是否有一種方法可以遍歷所有可能的列對,並將所有15位數字作爲小數字繪製在一個大圖中?謝謝!
%matplotlib notebook
import matplotlib.pyplot as plt
import matplotlib
matplotlib.style.use('ggplot')
pandas_df.plot(x='column_1', y='column_2', kind = 'scatter', c = 'result')
你有沒有通過'seaborn' [API]看着(https://stanford.edu/~mwaskom/software/seaborn/api.html)/ [圖庫](HTTPS:/ /stanford.edu/~mwaskom/software/seaborn/examples/index.html)? [PairGrid](https://stanford.edu/~mwaskom/software/seaborn/generated/seaborn.PairGrid.html#seaborn.PairGrid)特別看起來像你所描述的。 – lanery