Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added ability to offset errorbars when using errorevery. #6280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 28, 2019
Prev Previous commit
Next Next commit
style compliance fixes
  • Loading branch information
jcalbert committed Apr 26, 2019
commit 59db2edd90e7bb1c028ea73c7f3dd42cfe0ec4b5
9 changes: 4 additions & 5 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2954,16 +2954,15 @@ def test_errorbar_offsets(fig_test, fig_ref):
ax_ref = fig_ref.subplots()
ax_test = fig_test.subplots()


for color, shift in zip('rgbk', [0, 0, 2, 7]):
y += .02

#Using feature in question
# Using feature in question
ax_test.errorbar(x, y, yerr, errorevery=(shift, 4),
capsize=4, c=color)
capsize=4, c=color)

#Using manual errorbars
#n.b. errorbar draws the main plot at z=2.1 by default
# Using manual errorbars
# n.b. errorbar draws the main plot at z=2.1 by default
ax_ref.plot(x, y, c=color, zorder=2.1)
ax_ref.errorbar(x[shift::4], y[shift::4], yerr[shift::4],
capsize=4, c=color, fmt='none')
Expand Down