[혼공학습단 11기] 혼자 공부하는 데이터 분석 with 파이썬 Ch 05

수빈·2024년 2월 4일
0

5주차 기본미션 : p. 314의 손코딩(맷플롯립에서 bar()함수로 막대 그래프 그리기)을 코랩에서 그래프 출력하고 화면 캡처하기

plt.plot(count_by_year, '*-g')
plt.title('Books by year')
plt.xlabel('year')
plt.ylabel('number of books')
plt.xticks(range(1947, 2030, 10))
for idx, val in count_by_year[::5].items():
	plt.annotate(val, (idx, val), xytext=(2, 2), textcoords='offset points')
plt.show()

profile
CS공부 하고 있는 수빈입니다.

0개의 댓글