Skip to content

Commit 6775200

Browse files
committed
set errors to none if negative instead
1 parent f1bb99f commit 6775200

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Framework/PythonInterface/mantid/plots/axesfunctions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,12 @@ def errorbar(axes, workspace, *args, **kwargs):
288288
kwargs.pop("normalize_by_bin_width", None)
289289

290290
if dy is not None and min(dy) < 0:
291-
dy = abs(dy)
292-
logger.warning("Negative values found in y error when plotting error bars. Converting to positive and continuing.")
291+
dy = None
292+
logger.warning("Negative values found in y error when plotting error bars. Continuing without y error bars.")
293293

294294
if dx is not None and min(dx) < 0:
295-
dx = abs(dx)
296-
logger.warning("Negative values found in x error when plotting error bars. Converting to positive and continuing.")
295+
dx = None
296+
logger.warning("Negative values found in x error when plotting error bars. Continuing without x error bars.")
297297

298298
return axes.errorbar(x, y, dy, dx, *args, **kwargs)
299299

0 commit comments

Comments
 (0)