From b557b23fb1b0238d8f210bb8ab3ab42feb3eed1c Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Wed, 4 Nov 2020 17:04:02 +0100 Subject: [PATCH] [test][fixup][embedded][1d3d] Do not create plot before importing matplotlib --- test/multidomain/embedded/1d3d/1p_1p/convergence.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/multidomain/embedded/1d3d/1p_1p/convergence.py b/test/multidomain/embedded/1d3d/1p_1p/convergence.py index e0172e0b11..6dd40b6dfa 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") -- GitLab