Bug summary
When using variable colors for error bars, the colors are incorrect/shifted if NaN values are present.
Code for reproduction
import numpy as np import matplotlib.pyplot as plt x = [1, np.nan, 3, 4, 5] colors = ['red', 'green', 'blue', 'purple', 'orange'] fig = plt.figure() ax = fig.add_subplot(1, 1, 1) ax.scatter(x, x, c=colors, s=100) ax.errorbar(x, x, xerr=0.2, yerr=0.2, ecolor=colors, fmt='none') fig.savefig('errorbar_colors.png')
Actual outcome
Expected outcome
Matplotlib version
Fix matplotlib#13799
Revert changes to min and max validation due to failing test cases. R…
Fix color inconsistency issue matplotlib#13799
Resolve inconsistent NaN handling behaviour
Fixed incorrect colour in ErrorBar when Nan value is presented (#16724)
Closed by #16724.
Activity
Fix matplotlib#13799
Revert changes to min and max validation due to failing test cases. R…
Fix matplotlib#13799
Fix color inconsistency issue matplotlib#13799
Fix matplotlib#13799
Resolve inconsistent NaN handling behaviour
Resolve inconsistent NaN handling behaviour
Resolve inconsistent NaN handling behaviour
Resolve inconsistent NaN handling behaviour
Resolve inconsistent NaN handling behaviour
Fixed incorrect colour in ErrorBar when Nan value is presented (#16724)
timhoffm commented on Mar 22, 2020
Closed by #16724.