We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41536d8 commit 1ff2a4aCopy full SHA for 1ff2a4a
beams/plots.py
@@ -1,22 +1,23 @@
1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3
4
-from sys import platform
+import sys
5
import matplotlib
6
7
-if "linux" in platform:
+if "linux" in sys.platform or (sys.platform == "darwin" and sys.version_info[0] < 3):
8
gui_env = ['TkAgg', 'GTKAgg', 'Qt5Agg', 'WXAgg']
9
-elif platform == "darwin":
+elif sys.platform == "darwin":
10
gui_env = ['Qt5Agg', 'TkAgg', 'GTKAgg', 'WXAgg']
11
else:
12
pass
13
14
-if platform != "win32":
+if sys.platform != "win32":
15
for gui in gui_env:
16
try:
17
matplotlib.use(gui, warn=False, force=True)
18
break
19
except:
20
+ print(gui)
21
continue
22
23
import matplotlib.pyplot as plt
0 commit comments