플롯 스타일 지정하기
matplotlib 라이브러리에는 플롯의 모양을 손쉽게 바꿀 수 있는 여러 기본 스타일시트가 포함되어 있어요. 특정 스타일시트를 사용하려면 plt.style.use(your_stylesheet) 명령을 사용하면 됩니다. 여기서 your_stylesheet는 스타일시트의 이름이에요.
사용 가능한 스타일시트 목록을 보려면 print(plt.style.available) 명령을 실행해 보세요. 이 강의의 나머지 부분에서는 훌륭한 fivethirtyeight 스타일시트를 사용하겠습니다.
이 연습은 강의의 일부입니다
Python으로 시계열 데이터 시각화
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Import the matplotlib.pyplot sub-module
____
# Use the fivethirtyeight style
plt.____('fivethirtyeight')
# Plot the time series
ax1 = discoveries.plot()
ax1.set_title('FiveThirtyEight Style')
plt.show()