From 3f34ea12d8fc0930efe975fb1dcb1e1bd9478665 Mon Sep 17 00:00:00 2001 From: Luke Campagnola Date: Mon, 1 May 2017 09:45:09 -0700 Subject: [PATCH] Fix value stepping in intColor --- pyqtgraph/functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyqtgraph/functions.py b/pyqtgraph/functions.py index d79c350f..5cac27c5 100644 --- a/pyqtgraph/functions.py +++ b/pyqtgraph/functions.py @@ -313,7 +313,7 @@ def colorStr(c): return ('%02x'*4) % colorTuple(c) -def intColor(index, hues=9, values=1, maxValue=255, minValue=150, maxHue=360, minHue=0, sat=255, alpha=255, **kargs): +def intColor(index, hues=9, values=1, maxValue=255, minValue=150, maxHue=360, minHue=0, sat=255, alpha=255): """ Creates a QColor from a single index. Useful for stepping through a predefined list of colors. @@ -325,7 +325,7 @@ def intColor(index, hues=9, values=1, maxValue=255, minValue=150, maxHue=360, mi values = int(values) ind = int(index) % (hues * values) indh = ind % hues - indv = ind / hues + indv = ind // hues if values > 1: v = minValue + indv * ((maxValue-minValue) / (values-1)) else: