How to change fonts in matplotlib (python)?

后端 未结 5 1142
不思量自难忘°
不思量自难忘° 2020-11-29 20:26

It sounds as an easy problem but I do not find any effective solution to change the font (not the font size) in a plot made with matplotlib in python.

I found a coup

5条回答
  •  无人及你
    2020-11-29 20:51

    I prefer to employ:

    from matplotlib import rc
    #rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
    rc('font',**{'family':'serif','serif':['Times']})
    rc('text', usetex=True)
    

提交回复
热议问题