[데이터 시각화] matplotlib - 2
막대 그래프 그리기 bar() 함수를 이용해서 막대 그래프를 그릴 수 있다. # barh() 함수를 이용해 수평 막대 그래프 그리기도 가능하다. x1 = np.arange(0,20) # 0-19 까지 연속된 값 20 개 y1 = x1*2 x_ticks = np.arange(len(x1)) # 눈금지정(위치값) plt.bar(x1,y1, label = 'Blue bar', color = 'blue' , edgecolor = 'yellow', linewidth = 3) # plt.barh(x1,y1, label = 'Blue bar', color = 'blue' , edgecolor = 'yellow', linewidth = 3) plt.xlabel('bar number') plt.ylabel('bar he..
2023. 11. 4.