import matplotlib
from matplotlib import font_manager

font_manager.fontManager.addfont("path/to/ipaexg.ttf")
matplotlib.rc("font", family="IPAexGothic")