Skip to content

Matplotlib配置

Matplotlib配置

仓库里有更全面的配置

  1. 解决中文乱码问题
  2. 解决负号显示问题
  3. 优化图像显示效果
  4. 美化图像

编辑matplotlibrc文件,通常在~/.matplotlib/matplotlibrc,如果没有则创建一个。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
font.family : sans-serif
font.sans-serif : Source Han Serif CN #需要替换为你本地的字体
axes.unicode_minus : False
figure.figsize : 6.0, 4.0
figure.dpi : 300
savefig.dpi : 300
savefig.format : svg

lines.linewidth : 2
axes.labelsize : medium
axes.titlesize : large
xtick.labelsize : small
ytick.labelsize : small
legend.fontsize : small

About this Post

This post is written by KaranocaVe.

#Python #Matplotlib #数据可视化 #配置