2016-07-22 37 views
0

只創建特定屬性的箱線圖,我想創建兩個箱線圖,基於其規模達到分裂屬性的可視化我的數據的不同屬性。目前,我有這個seaborn我如何在一個數據幀

箱線圖顯示屬性

sns.boxplot(data=df) 
的分佈

box plot with all attributes included

我想它是象下面這樣在不同的盒子地塊屬性,基於其規模的圖像,但與每個盒形圖下方的屬性標籤(不是當前整數)。

箱線圖顯示屬性

sns.boxplot(data=[df['mi'],df['steps'],df['Standing time'],df['lying time']]) 

box plot by scale 1

回答

1

的分佈您可以通過列名

sns.boxplot(data=df[['mi', 'steps', 'Standing time', 'lying time']]) 
+0

感謝那些工作列表索引一個子集大熊貓數據幀! – xjackx

+0

@xjackx如果解決方案爲你工作,請「接受」答案,將問題標記爲已解決 – mwaskom

+0

您好@mwaskom您可以請幫助這個http://stackoverflow.com/questions/38595612/python-matplotlib-seaborn-boxplot -on-AN-X軸與數據點我想從你的答案中的一個改變一些特點,但我不明白。謝謝! – KKlalala

相關問題