통계적 플로팅

Matplotlib으로 시작하는 데이터 시각화

Ariel Rokem

Data Scientist

막대그래프에 오차 막대 추가

fig, ax = plt.subplots()

ax.bar("Rowing",
       mens_rowing["Height"].mean(),
       yerr=mens_rowing["Height"].std())

ax.bar("Gymnastics",
       mens_gymnastics["Height"].mean(),
       yerr=mens_gymnastics["Height"].std())

ax.set_ylabel("Height (cm)")

plt.show()
Matplotlib으로 시작하는 데이터 시각화

막대그래프의 오차 막대

Matplotlib으로 시작하는 데이터 시각화

플롯에 오차 막대 추가

fig, ax = plt.subplots()

ax.errorbar(seattle_weather["MONTH"],
            seattle_weather["MLY-TAVG-NORMAL"],
            yerr=seattle_weather["MLY-TAVG-STDDEV"])

ax.errorbar(austin_weather["MONTH"],
            austin_weather["MLY-TAVG-NORMAL"],
            yerr=austin_weather["MLY-TAVG-STDDEV"])

ax.set_ylabel("Temperature (Fahrenheit)")

plt.show()
Matplotlib으로 시작하는 데이터 시각화

플롯의 오차 막대

Matplotlib으로 시작하는 데이터 시각화

상자그림 추가

fig, ax = plt.subplots()

ax.boxplot([mens_rowing["Height"], mens_gymnastics["Height"]])
ax.set_xticklabels(["Rowing", "Gymnastics"]) ax.set_ylabel("Height (cm)") plt.show()
Matplotlib으로 시작하는 데이터 시각화

상자그림 해석하기

Matplotlib으로 시작하는 데이터 시각화

직접 해 보세요!

Matplotlib으로 시작하는 데이터 시각화

Preparing Video For Download...