There is a custom font in my app
app_path='/home/user1/myapp'
fname='/home/user1/myapp/font/myfont.ttf'
To setup globlal font to matplotlib,the docs said like this:
plt.rcParams['font.sans-serif']=['xxx font']
But it only works when the font already in system font path,and I have to use my custom font in my app path '/home/user1/myapp/font/myfont.ttf'
I know there is a way like this:
fname='/home/user1/myapp/font/myfont.ttf'
myfont=fm.FontProperties(fname=fname)
ax1.set_title('title test',fontproperties=myfont)
But that is not what I want,I don't want to set 'fontproperties' all the time,because there are some much code to change