R 사용자용 Python
Daniel Chen
Instructor
plot() 메서드kind 인수를 전달kind 옵션:line : 선 그래프 (기본값)bar : 수직 막대 그래프barh : 수평 막대 그래프hist : 히스토그램box : 박스플롯kde : 커널 밀도 추정 그래프density : 'kde'와 동일area : 면적 그래프pie : 파이 그래프scatter : 산점도hexbin : 헥스빈 그래프import matplotlib.pyplot as plt
iris['sepal_length'].plot(kind='hist')
plt.show()

cts = iris['species'].value_counts()
cts.plot(kind='bar')
plt.show()

iris.plot(kind='scatter', x='Sepal.Length', y='Sepal.Width')
plt.show()

iris.plot(kind='box')
plt.show()

iris.boxplot(by='Species', column='Sepal.Length')
plt.show()

R 사용자용 Python