Skip to content

Commit

Permalink
Using appropriate matplotlib backends on different platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
geojunky committed Nov 8, 2024
1 parent 4307eb9 commit 21131f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion seismic/ASDFdatabase/waveform_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

is_windows = sys.platform.startswith('win')
is_osx = sys.platform.startswith('darwin')
is_linux = sys.platform.startswith('linux')

if(is_windows): # suppress warnings on windows
import warnings
Expand Down Expand Up @@ -51,7 +52,8 @@
import multiprocess
from multiprocess import Manager, freeze_support

matplotlib.use('TKAgg')
if(is_windows | is_osx): matplotlib.use('TKAgg')
else: matplotlib.use('Agg')

class ProgressTracker(object):
def __init__(self, manager: Manager):
Expand Down

0 comments on commit 21131f4

Please sign in to comment.