aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/Plot.py
diff options
context:
space:
mode:
authorzsloan2021-10-05 16:41:13 -0500
committerGitHub2021-10-05 16:41:13 -0500
commit70023c835bdeeffc48efafe96626ac5b01b5a6d2 (patch)
tree5e23e1139d2e01e2ad42969f58d148132db963a7 /wqflask/utility/Plot.py
parentde79d0d5087bf97f59a16327132fd287d57e1c3f (diff)
parent4c6a7e46dd7afe311c0bed38c4a69ddadf3cb416 (diff)
downloadgenenetwork2-70023c835bdeeffc48efafe96626ac5b01b5a6d2.tar.gz
Merge branch 'testing' into feature/add_resizeable_columns
Diffstat (limited to 'wqflask/utility/Plot.py')
-rw-r--r--wqflask/utility/Plot.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/utility/Plot.py b/wqflask/utility/Plot.py
index 9b2c6735..d4256a46 100644
--- a/wqflask/utility/Plot.py
+++ b/wqflask/utility/Plot.py
@@ -139,7 +139,7 @@ def plotBar(canvas, data, barColor=BLUE, axesColor=BLACK, labelColor=BLACK, XLab
max_D = max(data)
min_D = min(data)
# add by NL 06-20-2011: fix the error: when max_D is infinite, log function in detScale will go wrong
- if max_D == float('inf') or max_D > webqtlConfig.MAXLRS:
+ if (max_D == float('inf') or max_D > webqtlConfig.MAXLRS) and min_D < webqtlConfig.MAXLRS:
max_D = webqtlConfig.MAXLRS # maximum LRS value
xLow, xTop, stepX = detScale(min_D, max_D)
@@ -156,7 +156,7 @@ def plotBar(canvas, data, barColor=BLUE, axesColor=BLACK, labelColor=BLACK, XLab
j += step
for i, item in enumerate(data):
- if item == float('inf') or item > webqtlConfig.MAXLRS:
+ if (item == float('inf') or item > webqtlConfig.MAXLRS) and min_D < webqtlConfig.MAXLRS:
item = webqtlConfig.MAXLRS # maximum LRS value
j = int((item - xLow) / step)
Count[j] += 1