从matplotlib文档中,
font = {'family' : 'normal', 'weight' : 'bold', 'size' : 22}matplotlib.rc('font', **font)这会将所有项目的字体设置为kwargs对象指定的字体
font。
另外,您也可以使用此答案中
rcParams``update建议的方法:
matplotlib.rcParams.update({'font.size': 22})要么
import matplotlib.pyplot as pltplt.rcParams.update({'font.size': 22})您可以在“定制matplotlib”页面上找到可用属性的完整列表。



