Skip to content

Commit 21c7ce7

Browse files
committed
Execute mpl.use earlier
1 parent 71ee6ae commit 21c7ce7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/experiment-scripts/generate-grt-figures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
import sys
2525

2626
import matplotlib as mpl
27+
28+
mpl.use("Agg") # For headless environments (without GUI); execute before `import matplotlib.figure`
2729
import matplotlib.figure
2830
import matplotlib.pyplot as plt
2931
import pandas as pd
3032
import seaborn as sns
3133
from matplotlib.backends.backend_pdf import PdfPages
3234

33-
mpl.use("Agg") # For headless environments (without GUI)
34-
3535

3636
def main():
3737
"""Parse arguments, load and process data, and save the selected figure type."""

0 commit comments

Comments
 (0)