darabos commited on
Commit
b2122a5
·
1 Parent(s): cfc0b8a

Make sure Matplotlib uses a non-interactive backend.

Browse files
lynxkite-core/src/lynxkite/core/ops.py CHANGED
@@ -289,6 +289,10 @@ def matplotlib_to_image(func):
289
  import io
290
 
291
  import matplotlib.pyplot as plt
 
 
 
 
292
 
293
  @functools.wraps(func)
294
  def wrapper(*args, **kwargs):
 
289
  import io
290
 
291
  import matplotlib.pyplot as plt
292
+ import matplotlib
293
+
294
+ # Make sure we use the non-interactive backend.
295
+ matplotlib.use("agg")
296
 
297
  @functools.wraps(func)
298
  def wrapper(*args, **kwargs):