From aebc66dcaaad73a0c6948f81ab06697f3db632e4 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Sun, 1 Aug 2021 10:45:29 +0800 Subject: [PATCH] fix log mode by reverting to previous formulation this formulation is in the documentation for setLogMode() --- pyqtgraph/graphicsItems/PlotDataItem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqtgraph/graphicsItems/PlotDataItem.py b/pyqtgraph/graphicsItems/PlotDataItem.py index 97c8cb55..0c6b68a8 100644 --- a/pyqtgraph/graphicsItems/PlotDataItem.py +++ b/pyqtgraph/graphicsItems/PlotDataItem.py @@ -701,7 +701,7 @@ class PlotDataItem(GraphicsObject): eps = np.finfo(y.dtype).eps else: eps = 1 - y = np.copysign(np.log10(np.abs(y)+eps), y) + y = np.sign(y) * np.log10(np.abs(y)+eps) ds = self.opts['downsample'] if not isinstance(ds, int):