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

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added comments; fixed typo
  • Loading branch information
larrybradley committed Apr 3, 2014
commit 8039d12a631c5fb7499d47d1044f87c45c754550
2 changes: 1 addition & 1 deletion examples/statistics/errorbar_limits.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Demo of the errorbar function, includig upper and lower limits
Demo of the errorbar function, including upper and lower limits
"""
import numpy as np
import matplotlib.pyplot as plt
Expand Down
4 changes: 4 additions & 0 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2754,6 +2754,8 @@ def xywhere(xs, ys, mask):
right = [thisx + thiserr for (thisx, thiserr)
in cbook.safezip(x, xerr)]

# select points without upper/lower limits in x
# draw normal errorbars for these points
noxlims = ~(xlolims | xuplims)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line deserves a comment

if noxlims.any():
yo, _ = xywhere(y, right, noxlims & everymask)
Expand Down Expand Up @@ -2802,6 +2804,8 @@ def xywhere(xs, ys, mask):
upper = [thisy + thiserr for (thisy, thiserr)
in cbook.safezip(y, yerr)]

# select points without upper/lower limits in y
# draw normal errorbars for these points
noylims = ~(lolims | uplims)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for consistency, this line should also get a similar comment

if noylims.any():
xo, _ = xywhere(x, lower, noylims & everymask)
Expand Down