matplotlib.pyplot.rc — Matplotlib 3.1.3 documentation
# 템블릿
print(plt.style.available)
>>>['Solarize_Light2', '_classic_test_patch', 'bmh', 'classic',
'dark_background', 'fast', 'fivethirtyeight', 'ggplot', 'grayscale',
'seaborn', 'seaborn-bright', 'seaborn-colorblind', 'seaborn-dark',
'seaborn-dark-palette', 'seaborn-darkgrid', 'seaborn-deep',
'seaborn-muted', 'seaborn-notebook', 'seaborn-paper', 'seaborn-pastel',
'seaborn-poster', 'seaborn-talk', 'seaborn-ticks', 'seaborn-white',
'seaborn-whitegrid', 'tableau-colorblind10']
plt.style.use('fivethirtyeight')
# 윈도우에서 한글폰트가 깨지지 않게 하기 위한 설정
# '-' 값이 깨지지 않게 하기 위한 설정
# Wind : "Malgun Gothic", MAC:"AppleGothic"
plt.rc("font", family= "Malgun Gothic")
plt.rc("axes", unicode_minus = False) # '-' 값이 깨지지
from IPython.display import set_matplotlib_formats
set_matplotlib_formats('retina')
pd.Series([1,3,5,-7,9]).plot(title='한글')
# style = {darkgrid, whitegrid, dark, white, ticks}
sns.set_theme(font ='Malgun Gothic',
rc = {'axes.unicode_minus' : False},
style ='whitegrid')
from IPython.display import set_matplotlib_formats
set_matplotlib_formats('retina')
pd.Series([1,3,5,-7,9]).plot(title= '한글')
# 나눔고딕 설치
#!apt -qq -y install fonts-nanum > /dev/null
import matplotlib.font_manager as fm
fontpath = '/usr/share/fonts/truetype/nanum/NanumBarunGothic.ttf'
font = fm.FontProperties(fname=fontpath, size=9)
fm._rebuild()
plt.rc('font', family='NanumBarunGothic')
%config InlineBackend.figure_format = 'retina'