matplotlib自带一些配色方案,以及为生成出版质量的图片而设定的默认配置信息。

matplotlib的默认行为可以通过一组全局参数定义,它们会管理图像大小、subplot边距、配色方案、字体大小、网格类型等。

可以使用代码形式,将全局图像的默认大小设置为10x10

plt.rc('figure', figsize=(10, 10))

更为简单的方法是将配置选项写成字典

font_options={'family':'monospace',
                'weight':'bold',
                'size':'small'}
plt.rc('font',**font_options)

results matching ""

    No results matching ""