import seaborn as sns
import matplotlib.pyplot as plt
sns.__version__
sns.get_dataset_names()
df = sns.load_dataset("car_crashes")
df.head()
import matplotlib.font_manager as fm
for f in fm.fontManager.ttflist:
print(f.name)
테마 스타일 설정
sns.set_style() : 스타일 테마 설정
sns.set_context() : 문맥에 따라 스타일 크기 조정
sns.set_palette() : 색상 팔레트 설정
sns.set_style("white")
sns.set_context("notebook")
sns.set_palette("muted")
# 이후 폰트 깨짐 방지 설정
# 한글 깨짐 방지
# Windows에서 한글 폰트 설정
plt.rcParams['font.family'] = 'Malgun Gothic' # '맑은 고딕'이 설치되어 있을 경우
plt.rcParams['axes.unicode_minus'] = False # 마이너스(-) 부호 깨짐 방지
# macOS에서 한글 폰트 설정
plt.rcParams['font.family'] = 'AppleGothic' # macOS 기본 한글 폰트
plt.rcParams['axes.unicode_minus'] = False