diff --git a/test/multidomain/embedded/1d3d/1p_1p/convergence.py b/test/multidomain/embedded/1d3d/1p_1p/convergence.py
index e0172e0b114e0d87cbde393917c1000504b3d980..6dd40b6dfae331a8c8604af2ba193b2676c70b96 100755
--- a/test/multidomain/embedded/1d3d/1p_1p/convergence.py
+++ b/test/multidomain/embedded/1d3d/1p_1p/convergence.py
@@ -59,8 +59,6 @@ table1 = [["", "", "", "", "", "", ""] for i in range(len(cells)+1)]
 table2 = [["", "", "", "", "", "", ""] for i in range(len(cells)+1)]
 table3 = [["", "", "", "", "", "", ""] for i in range(len(cells)+1)]
 
-dpi = 300.0
-fig, axes = plt.subplots(1, 3, dpi=dpi, figsize=(8, 4))
 for exec, result in res.items():
     p3d = []
     p1d = []
@@ -140,10 +138,14 @@ for exec, result in res.items():
 try:
     import matplotlib
     import matplotlib.pyplot as plt
+
     plt.style.use('ggplot')
     font = {'family': 'sans-serif', 'weight': 'normal', 'size': 8}
     matplotlib.rc('font', **font)
 
+    dpi = 300.0
+    fig, axes = plt.subplots(1, 3, dpi=dpi, figsize=(8, 4))
+
     x = np.linspace(np.min(hR), np.max(hR), 10)
     axes[0].plot(x, np.power(x*radius*0.4, 1.5), "--k", label=r"$\Delta$ 1.5")
     axes[0].plot(x, np.power(x*radius*0.3, 2), "-.k", label=r"$\Delta$ 2")