Commit ac37f643 authored by Oliver Kirsebom's avatar Oliver Kirsebom
Browse files

disable viz on mac and windows

parent 58a1fe85
......@@ -35,13 +35,16 @@ from ketos.data_handling.parsing import str2bool
import src.parsing as pa
from src.parsing import Detector
import matplotlib
viz = os.environ.get('DISABLE_VIZ')
if viz is not None:
if int(viz) == 1:
matplotlib.use('Agg')
from sys import platform as sys_pf
if sys_pf == 'darwin' or sys_pf == 'win32':
import matplotlib
matplotlib.use("TkAgg")
DISABLE_VIZ = True
print('Visualization disabled on Mac and Windows')
else:
DISABLE_VIZ = False
import matplotlib.pyplot as plt
from matplotlib import pyplot as plt
def extract_time_res(df):
......@@ -214,7 +217,7 @@ def main():
# plot
if show_graph:
if show_graph and not DISABLE_VIZ:
ax = plt.gca()
ax.set_xlabel('Time')
ax.set_ylabel('Signal')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment