Do not require matplotlib unless debug output is requested

This commit is contained in:
jaseg 2025-12-17 12:47:39 +01:00
parent e54517544a
commit 2b64ee5081

View file

@ -11,8 +11,6 @@ import sys
import hashlib
import platformdirs
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
import wasmtime
@ -309,6 +307,9 @@ class Skeletonator:
self.debug_arms.append((debug_arm, direction, t1, t2))
def dump_to_pdf(self, filename):
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
with PdfPages(filename) as pdf:
fig, ax = plt.subplots(figsize=(10, 10))