!apt-get update -qq
!apt-get install fonts-nanum* -qq
import matplotlib.font_manager as fm
from matplotlib import pyplot as plt
path = '/usr/share/fonts/truetype/nanum/NanumGothicEco.ttf'
font_name = fm.FontProperties(fname=path, size=10).get_name()
plt.rc('font', family=font_name)
fm._rebuild()
from matplotlib import pyplot as plt
plt.rc('font', family='NanumBarunGothic')