zoukankan      html  css  js  c++  java
  • 学习笔记10—Python 绘图集

    ordered_data = np.load('ordered_data_just_TD_mae.npy')
    results = pd.Series(np.squeeze(np.load('results_just_TD_mae.npy')))
    sigma = pd.Series(np.squeeze(np.load('sigma_just_TD_mae.npy')))

    print(np.argmin(results[1:80]))
    print(np.min(results[1:80]))

    x = np.linspace(0,80,80)
    plt.plot(x,results,label = 'MAE')
    plt.hold(True)
    plt.fill_between(x,results-sigma,results+sigma,alpha=0.5, edgecolor='#CC4F1B', facecolor='#FF9848')
    plt.annotate('',xy = (np.argmin(results[1:80]),results[np.argmin(results[1:80])]), xytext = (np.argmin(results[1:80]),3+results[np.argmin(results[1:80])]), arrowprops=dict(facecolor='red',shrink=20))
    plt.text(np.argmin(results[1:80])-6,(results[np.argmin(results[1:80])]-1),r'MAE = %.2f'%results[np.argmin(results[1:80])],fontsize = 10)
    plt.text(np.argmin(results[1:80])-5,(results[np.argmin(results[1:80])]+3.5),r'K = %d'%np.argmin(results[1:80]),fontsize = 10)
    plt.xlabel('number of descriptors (K)')
    plt.ylabel('MAE (years)')
    plt.legend(['TD Data'], loc = 2, ncol = 1) # loc = 1 represent right, loc = 2 represent left, ncol = 1 represent 1 column

  • 相关阅读:
    Hello World
    JAVA环境变量配置
    基本的Dos命令
    博客的重要性
    MySQL——合并查询结果
    mysql中使用正则表达式查询
    MySQL高级查询
    MySQL之常用函数
    MySQL之多表操作
    MySQL之增删改查
  • 原文地址:https://www.cnblogs.com/hechangchun/p/9594438.html
Copyright © 2011-2022 走看看