Skip to content
Snippets Groups Projects
Commit c896db59 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Merge branch 'displayless-matplotlib' into 'master'

displayless matplotlib import workaround also in helper_functions.py

See merge request GregAshton/PyFstat!12
parents b23ff98a b462feba
No related branches found
No related tags found
No related merge requests found
......@@ -11,12 +11,19 @@ import inspect
import peakutils
from functools import wraps
from scipy.stats.distributions import ncx2
import numpy as np
import lal
import lalpulsar
# workaround for matplotlib on X-less remote logins
if 'DISPLAY' in os.environ:
import matplotlib.pyplot as plt
else:
logging.info('No $DISPLAY environment variable found, so importing \
matplotlib.pyplot with non-interactive "Agg" backend.')
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
def set_up_optional_tqdm():
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment