matplotlib는 파이썬을 이용한 데이터분석에서 빼놓을 수 없는 시각화 라이브러리입니다.
matplotlib를 토대로 좀더 개선하여 만든 seaborn 라이브러리도 있지만 기본적으로 matplotlib를 이해하는 것이 중요하다고 생각합니다.
matplotlib는 2002년에 프로젝트가 시작되었다고 하니 엄청 오래된 고인물이네요..ㅎ 그러다 보니 인터페이스 자체가 투박한 상태입니다. 하지만 matplotlib에서는 본인이 원하는 대로 기본스타일을 변경하여 사용 할 수 있는데요.
이번 글에서는 stylesheet을 바꾸는 방법 및 종류에 대하여 알아보도록 합시다.
stylesheet를 변경하기 위해서는 다음과 같이 입력합니다.
import matplotlib.pyplot as plt
plt.style.ues('stylesheet이름')
다음은 각각의 stylesheet에 대한 예시 입니다.
plt.style.use('bmh')
plt.style.use('classic')
plt.style.use('dark_background')
plt.style.use('fivethirtyeight')
plt.style.use('ggplot')
plt.style.use('grayscale')
plt.style.use('seaborn-bright')
plt.style.use('seaborn-colorblind')
plt.style.use('seaborn-dark')
plt.style.use('seaborn-dark-pallette')
plt.style.use('seaborn-darkgrid')
plt.style.use('seaborn-deep')
plt.style.use('seaborn-muted')
plt.style.use('seaborn-notebook')
plt.style.use('seaborn-paper')
plt.style.use('seaborn-pastel')
plt.style.use('seaborn-poster')
plt.style.use('seaborn-talk')
plt.style.use('seaborn-ticks')
plt.style.use('seaborn-white')
plt.style.use('seaborn-whitegrid')