From fc7921100e6bb66b0367f2c57e7122ace832b918 Mon Sep 17 00:00:00 2001 From: alfon_news Date: Tue, 9 Jun 2020 07:51:14 +0200 Subject: [PATCH] Fix siScale imprecision errors (#508) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix siScale imprecision errors * Implement 2xB suggested change Co-authored-by: Alberto Fontán Correa Co-authored-by: Ogi Moore --- pyqtgraph/functions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyqtgraph/functions.py b/pyqtgraph/functions.py index 193cce6a..b202e86a 100644 --- a/pyqtgraph/functions.py +++ b/pyqtgraph/functions.py @@ -77,7 +77,8 @@ def siScale(x, minVal=1e-25, allowUnicode=True): pref = SI_PREFIXES[m+8] else: pref = SI_PREFIXES_ASCII[m+8] - p = .001**m + m1 = -3*m + p = 10.**m1 return (p, pref)