zoukankan      html  css  js  c++  java
  • matplotlib.errorbar()

    """plt.errorbar(x, y, yerr = , xerr = , fmt = "", ecolor = , elinewidth = None, capsize = None, capthick = None,) # this is the whole function
    标准差: standard deviation
    标准误: standard error
    x: 横坐标
    y: 纵坐标
    fmt: 各数据点之间连接的形式
    eline 方差线的宽度
    capsize: 标准差线终点两个横线的长度
    capthick: 标准差线终点两个横线的厚度
    xerr: x坐标的标准差,上下各一个标准差
    yerr: y坐标的标准差,上下各一个标准差
    """
    
    import matplotlib.pyplot as plt
    import numpy as np
    
    x = np.linspace(1,10,20)
    y = np.sin(x) * 3
    std = np.random.rand(20)
    
    plt.errorbar(x, y, yerr = std, fmt = "-", ecolor = "red", elinewidth = 0.5, capsize = 2, capthick = 1)
    plt.show()
    
    # 转自: https://blog.csdn.net/weixin_38314865/article/details/104869284
    """plt.errorbar(x, y, yerr = , xerr = , fmt = "", ecolor = , elinewidth = None, capsize = None, capthick = None,) # this is the whole function
    标准差: standard deviation
    标准误: standard error
    x: 横坐标
    y: 纵坐标
    fmt: 各数据点之间连接的形式
    eline 方差线的宽度
    capsize: 标准差线终点两个横线的长度
    capthick: 标准差线终点两个横线的厚度
    xerr: x坐标的标准差,上下各一个标准差
    yerr: y坐标的标准差,上下各一个标准差
    """
    
    import matplotlib.pyplot as plt
    import numpy as np
    
    x = np.linspace(1,10,20)
    y = np.sin(x) * 3
    std = np.random.rand(20)
    
    plt.errorbar(x, y, yerr = std, fmt = "-", ecolor = "red", elinewidth = 0.5, capsize = 2, capthick = 1)
    plt.show()
    
    # 转自: https://blog.csdn.net/weixin_38314865/article/details/104869284

  • 相关阅读:
    CI框架用cookie实现用户自动登录
    php预定义常量
    ubuntu root密码
    jQuery的form中ajaxSubmit参数
    优酷视屏播放去广告链接id_XXX.html内容替换红色
    linux 重启apache:apachectl -k graceful
    python深copy与浅copy的区别
    python3中pathlib库的Path类方法汇总
    unittest使用discover加载不同目录下的case失败,提示Path must be within the project
    自定义HTMLTestRunner报告case名称
  • 原文地址:https://www.cnblogs.com/zijidefengge/p/13288734.html
Copyright © 2011-2022 走看看