Skip to content

Commit 4c16e4e

Browse files
committed
Adding a function that tests for a minimum required version of Matplotlib (which we need to do for certain features).
1 parent b9ff78f commit 4c16e4e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Utils.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import matplotlib
12
import math
23
import re
34
from Line import Line
@@ -93,3 +94,12 @@ def getCDF(values):
9394
assert(count == len(line.yValues))
9495

9596
return line
97+
98+
def _check_min_matplotlib_version(self, version):
99+
versionPieces = [int(x) for x in matplotlib.__version__.split('.')]
100+
101+
(superMajor, major, minor) = versionPieces[0:3]
102+
103+
minVersionSatisfied = (superMajor >= version[0] and major >= version[1]
104+
and minor >= version[2])
105+
return minVersionSatisfied

0 commit comments

Comments
 (0)