zoukankan      html  css  js  c++  java
  • Debug --> matlibplot的字体设置方法

    plt.figure(figsize=[15,8]) 
    plt.scatter(X, Y, label = 'label')
    plt.plot(X, func(X, a, b), 'red', label = 'label') 
    plt.title('title', fontdict={'family' : 'Times New Roman', 'size' : 16})
    plt.ylabel('y', fontdict={'family' : 'Times New Roman', 'size' : 16})
    plt.xlabel('x', fontdict={'family' : 'Times New Roman', 'size' : 16})
    plt.yticks(fontproperties = 'Times New Roman', size = 14) 
    plt.xticks(fontproperties = 'Times New Roman', size = 14) 
    plt.legend(prop={'family' : 'Times New Roman', 'size' : 16})
    plt.savefig('./workspace/' + name + '.ps', dpi = 200) 
    plt.tight_layout()
    plt.show()
    To see I can not see, to know I do not know.
  • 相关阅读:
    053467
    053466
    053465
    NC201613 Jelly
    NC14608 after与迷宫
    NC14572 走出迷宫
    340. 通信线路
    1135. 新年好
    903. 昂贵的聘礼
    P5767 [NOI1997]最优乘车
  • 原文地址:https://www.cnblogs.com/aluomengmengda/p/14844184.html
Copyright © 2011-2022 走看看