diff --git a/latex/script/mattex1.py b/latex/script/mattex1.py index 6d9ec935..e04cb2f7 100644 --- a/latex/script/mattex1.py +++ b/latex/script/mattex1.py @@ -13,7 +13,7 @@ x = np.linspace(0, 10, 1000) y = x ** np.sin(x) -fig, ax = plt.subplots(1, 1, layout="constrained") +fig, ax = plt.subplots(layout="constrained") ax.plot(x, y) ax.set_xlabel(r"$\alpha / \Omega$") diff --git a/latex/script/mattex2.py b/latex/script/mattex2.py index 788647f1..83a6b077 100644 --- a/latex/script/mattex2.py +++ b/latex/script/mattex2.py @@ -13,8 +13,7 @@ x = np.linspace(0, 10, 1000) y = x ** np.sin(x) # set figure size and use constrained_layout -fig = plt.figure(figsize=(6.022, 3.39), layout="constrained") -ax = fig.add_subplot(111) +fig, ax = plt.subplots(figsize=(6.022, 3.39), layout="constrained") ax.plot(x, y) ax.set_xlabel(r"$\alpha / \Omega$") diff --git a/latex/script/mattex3.py b/latex/script/mattex3.py index ceb7b821..73cb915a 100644 --- a/latex/script/mattex3.py +++ b/latex/script/mattex3.py @@ -15,8 +15,7 @@ x = np.linspace(0, 10, 1000) y = x ** np.sin(x) # set figure size and use constrained_layout -fig = plt.figure(figsize=(6.022, 3.39), layout="constrained") -ax = fig.add_subplot(111) +fig, ax = plt.subplots(figsize=(6.022, 3.39), layout="constrained") ax.plot(x, y) ax.set_xlabel(r"$\alpha \mathbin{/} \unit{\ohm}$") # <-- We can use siunitx now! diff --git a/latex/script/mattex4.py b/latex/script/mattex4.py index 790060a5..1f3100c5 100644 --- a/latex/script/mattex4.py +++ b/latex/script/mattex4.py @@ -15,8 +15,7 @@ x = np.linspace(0, 10, 1000) y = x ** np.sin(x) # set figure size and use constrained_layout -fig = plt.figure(figsize=(6.022, 3.39), layout="constrained") -ax = fig.add_subplot(111) +fig, ax = plt.subplots(figsize=(6.022, 3.39), layout="constrained") ax.plot(x, y) ax.set_xlabel(r"$\alpha \mathbin{/} \unit{\ohm}$") diff --git a/latex/script/mattex5.py b/latex/script/mattex5.py index d3cd4de7..ad6d73b0 100644 --- a/latex/script/mattex5.py +++ b/latex/script/mattex5.py @@ -11,7 +11,7 @@ x = np.linspace(0, 10, 1000) y = x ** np.sin(x) -fig, ax = plt.subplots(1, 1, layout="constrained") +fig, ax = plt.subplots(layout="constrained") ax.plot(x, y) ax.set_xlabel(r"$\alpha \mathbin{/} \unit{\ohm}$")