1.第一步:
C:\Program Files (x86)\Graphviz2.37\etc\fonts fonts.conf
<dir>C:/WINDOWS/Fonts</dir>
<dir>~/.fonts</dir>
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"];