Closed
Description
Bug summary
If unique upper and lower errors are specified, and one of them is negative, then the errorbar will appear separate from the marker. It looks like this was mentioned ages ago in #2717 but I could not find a follow up to that issue.
Code for reproduction
import matplotlib.pyplot as plt
# 1
plt.errorbar([0], [0], yerr=[[-0.5], [1]], marker="o")
# 2
plt.errorbar([0], [0], xerr=[[-0.5], [1]], marker="o")
# 3
plt.errorbar([0], [0], xerr=[[-0.5], [1]], yerr=[[-0.5], [1]], marker="o")
Actual outcome
1
2
3
Expected outcome
I understand the documentation states that the error inputs should be positive values, but I would expect some error like ValueError
when there is a negative value provided, rather than it trying to make the plot. I would prefer an error being thrown and the plot not being made.
Operating system
CentOS Linux release 7.9.2009 (Core)
Matplotlib Version
3.4.3
Matplotlib Backend
module://matplotlib_inline.backend_inline
Python version
3.9.6
Jupyter version
3.1.9
Other libraries
No response
Installation
conda
Conda channel
No response