seaborn, matplotlib 글꼴 크기(fontsize) 조정

찌니·2021년 6월 24일
0

1.seaborn에서 글꼴 크기 조정

import seaborn as sns
sns.countplot(x='Target',data=df_name)
sns.set(font_scale=1.5)

2.matplotlib 글꼴 크기 조정

2-1)

import matplotlib.pyplot as plt
plt.rc('font', size=20, weight="bold")
plt.rc('xtick', labelsize=20) 
plt.rc('ytick', labelsize=20) 

2-2)

font = {'family' : 'normal',
        'weight' : 'bold',
        'size'   : 22}

plt.rc('font', **font)

2-3)

plt.rcParams.update({'font.size': 22})

2-4)

import matplotlib.pyplot as plt

SMALL_SIZE = 8
MEDIUM_SIZE = 10
BIGGER_SIZE = 12

plt.rc('font', size=SMALL_SIZE)          # controls default text sizes
plt.rc('axes', titlesize=SMALL_SIZE)     # fontsize of the axes title
plt.rc('axes', labelsize=MEDIUM_SIZE)    # fontsize of the x and y labels
plt.rc('xtick', labelsize=SMALL_SIZE)    # fontsize of the tick labels
plt.rc('ytick', labelsize=SMALL_SIZE)    # fontsize of the tick labels
plt.rc('legend', fontsize=SMALL_SIZE)    # legend fontsize
plt.rc('figure', titlesize=BIGGER_SIZE)  # fontsize of the figure title
profile
https://gggggeun.tistory.com/

0개의 댓글

관련 채용 정보