Skip to content

Commit

Permalink
Merge branch 'main' into release_052
Browse files Browse the repository at this point in the history
  • Loading branch information
bknueven authored Feb 22, 2022
2 parents 1ccb983 + f1721c0 commit 0bdec05
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions egret/viz/generate_graphs.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import os
import sys
from collections import namedtuple, defaultdict
import datetime
import textwrap

import matplotlib as mpl
## catch when we're running linux without X
if os.name == 'posix' and 'DISPLAY' not in os.environ:
mpl.use('Agg')
if not hasattr(sys, 'ps1'):
# Not in interactive mode, so use the AGG backend for
# systems without GUIs (which probably will not be run
# in interactive mode). See the discussion on
# https://stackoverflow.com/questions/2356399/tell-if-python-is-in-interactive-mode
# and the definition https://docs.python.org/3/library/sys.html#sys.ps1
mpl.use('AGG')

import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
Expand Down

0 comments on commit 0bdec05

Please sign in to comment.