Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit057c7a2

Browse files
committed
Simplify wording of allowed errorbar() error values
1 parentaa122c0 commit057c7a2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎lib/matplotlib/axes/_axes.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3181,7 +3181,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
31813181
errors.
31823182
- *None*: No errorbar.
31833183
3184-
Note that all error arrays should have *non-negative* values.
3184+
All values must be >= 0.
31853185
31863186
See :doc:`/gallery/statistics/errorbar_features`
31873187
for an example on the usage of ``xerr`` and ``yerr``.
@@ -3293,9 +3293,10 @@ def has_negative_values(array):
32933293
exceptTypeError:# if array contains 'datetime.timedelta' types
32943294
returnnp.any(array<timedelta(0))
32953295

3296-
ifhas_negative_values(xerr)orhas_negative_values(yerr):
3297-
raiseValueError(
3298-
"'xerr' and 'yerr' must have non-negative values")
3296+
ifhas_negative_values(xerr):
3297+
raiseValueError("'xerr' must not contain negative values")
3298+
ifhas_negative_values(yerr):
3299+
raiseValueError("'yerr' must not contain negative values")
32993300

33003301
ifisinstance(errorevery,Integral):
33013302
errorevery= (0,errorevery)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp