Errorbar limit selection
Illustration of selectively drawing lower and/or upper limit symbols on errorbars using the parameters , of errorbar.uplimslolims
Alternatively, you can use 2xN values to draw errorbars in only one direction.
Similarly and can be used on the horizontal errorbars.xuplimsxlolimsxerr
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 9 23:12:48 2021
@author: Machi
"""
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
x = np.arange(10)
y = 2.5 * np.sin(x / 20 * np.pi)
yerr = np.linspace(0.05, 0.2

本文介绍如何使用Python的matplotlib库选择性地绘制误差条形图的上限和/或下限符号。通过errorbar函数的uplims和lolims参数可以控制误差条的方向。此外,还提供了一种使用2xN值仅在一个方向上绘制误差条的方法。对于水平误差条,可以使用xuplims和xlolims。示例中展示了matplotlib.axes.Axes.errorbar和matplotlib.pyplot.errorbar的用法。
最低0.47元/天 解锁文章
350

被折叠的 条评论
为什么被折叠?



