0

Pycaret plot_model() did not support thai font(thai language) on matplotlibs.

How to fix this issue? plot_model() font missing

Thank you.

ps. On my df, It's can read thai font as encoding = 'utf-8-sig' already.

ps2. I also use this code but not working

import matplotlib.pyplot as plt
plt.rcParams['font.family'] = 'tahoma'

1 Answers1

0

Finally I got this:

!wget -q http://www.arts.chula.ac.th/ling/wp-content/uploads/TH-Sarabun_Chula1.1.zip -O font.zip
!unzip -qj font.zip TH-Sarabun_Chula1.1/THSarabunChula-Regular.ttf

mpl.font_manager.fontManager.addfont('THSarabunChula-Regular.ttf')
mpl.rc('font', family='TH Sarabun Chula')