Skip to content

Commit 78ad59e

Browse files
committed
correct answer
1 parent b3cfad3 commit 78ad59e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

D20_seaborn/homework.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@
1818
# 畫圖
1919
sns.residplot(x=x, y=y, lowess=True, color="g")
2020

21+
plt.show()
2122
# 作業目標(2):
22-
2323
# 使用 distplot()使用簡單的規則來正確猜測預設情況下正確的數位,但嘗試更多或更少的 bin 可能會顯示資料中的其他特徵:
2424
# 有無kde對圖形分布的影響
2525
# bin: 指的是特徵值,
26+
sns.set(color_codes=True)
2627

27-
# 使用sns.distplot()
28-
sns.displot()
28+
# bin: 指的是特徵值,
29+
# kde: on/off
30+
sns.distplot(x=x, bins=15, kde=False, rug=True);
31+
plt.show()
2932
###
30-
plt.show()
33+
sns.distplot(x=x, bins=15, kde=True, rug=True);
34+
plt.show()

0 commit comments

Comments
 (0)