graphviz Windows中文乱码

1.第一步:

C:\Program Files (x86)\Graphviz2.37\etc\fonts    fonts.conf

C:/WINDOWS/Fonts
 ~/.fonts


2.第二步,在保存时保存为utf-8或者手动utf-8格式:

with open("D:\\id3.dot","w",-1,"utf-8") as f:


3.第三步:在保存文件前面修改如下:

edge [fontname="Microsoft YaHei"];

node [shape=box, fontname="Microsoft YaHei" size="20,20"];

你可能感兴趣的:(graphviz Windows中文乱码)