What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Pass separate lower and upper error distances to Matplotlib’s errorbar function as a two-row array: the first row is the lower distance, and the second is the upper. Use yerr for vertical bars or xerr for horizontal bars; all distances must be nonnegative.
Pass separate lower and upper errors
For N data points, the asymmetric input has shape (2, N). Each column corresponds to one point. Its first row gives the distance below the point and its second row gives the distance above it. These are distances from the central value, not signed endpoint offsets.
import numpy as np
import matplotlib.pyplot as plt
x = np.array([1, 2, 3])
y = np.array([2.0, 3.5, 2.8])
lower = np.array([0.2, 0.4, 0.1])
upper = np.array([0.5, 0.3, 0.6])
fig, ax = plt.subplots()
ax.errorbar(x, y, yerr=np.vstack([lower, upper]), fmt='o', capsize=4)
plt.show()
Here, the first point’s vertical bar extends from y[0] - 0.2 to y[0] + 0.5. The second point uses its own lower and upper distances, and so on. The Matplotlib 3.11.0 errorbar API reference documents this two-row format and the lower-then-upper row order.
Choose vertical or horizontal error bars
Use yerr when uncertainty extends vertically around each y value. Use xerr when it extends horizontally around each x value. In either case, supply lower and upper distances in the same row order.
#1 Best Overall
A one-dimensional array with one value per point represents symmetric errors that can vary from point to point. Use the two-row (2, N) form when the lower and upper distances differ. Matplotlib’s official asymmetric error-bar example demonstrates building the two rows from lower and upper arrays.
Keep error inputs nonnegative
Error-bar inputs are sizes, so each value must be greater than or equal to zero. Do not encode a lower endpoint by putting a negative number in the first row. For a central value v, provide the positive distance from v down to the lower endpoint and the positive distance from v up to the upper endpoint.
Rank #2
Control what the plot displays
fmt='none'draws error bars without data markers or a connecting line.ecolorsets the error-bar color; if omitted, the bars use the data-line color.capsizesets the cap length in points.erroreverycan show bars only at selected data points when drawing every bar would clutter the plot.
For one-sided limits, the API provides lolims, uplims, xlolims, and xuplims. If an axis is inverted, set its limits before calling errorbar, as directed by the API reference.
What the plot does—and does not—say
errorbar renders the error sizes you provide; it does not decide whether they represent a confidence interval, standard error, measurement bound, or another quantity. Choose and describe the uncertainty calculation separately so readers can interpret the bars correctly.
Free tools Windows power users keep installed
One-click scans. No signup required.
Quick Recap
Best Value
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




