728x90
# 하나에 여러개의 plot을 그린다.
plt.figure(figsize=(12,5)) # 가로,세로 사이즈 변경
plt.subplot(1,2,1) # 1행 2열중에 첫번째 plot
plt.title('speed hist.bins 10') # 제목 설정
plt.xlabel('Speed') # x축 설정
plt.ylabel('# of Characters') # y축 설정
plt.hist(data=df,x='speed',rwidth=0.8)
plt.subplot(1,2,2)
plt.title('speed hist. bins 30')
plt.xlabel('Speed')
plt.ylabel('# of Characters')
plt.hist(data=df,x='speed',rwidth=0.8,bins=30)
plt.show()
'Python' 카테고리의 다른 글
Python파이썬 데이터 시각화 matplotlib seaborn regplot , pairplot (0) | 2022.11.28 |
---|---|
Python파이썬 데이터 시각화 matplotlib scatterplots, (0) | 2022.11.28 |
Python파이썬 데이터 시각화 matplotlib histogram(히스토그램) (0) | 2022.11.28 |
Python파이썬 데이터 시각화 matplotlib pie chart(파이 차트) (0) | 2022.11.28 |
Python파이썬 matplotlib, seaborn을 이용한 데이터 시각화 countplot (0) | 2022.11.28 |