From 087e1d58271a3a79864e71c9d2196955178e57d5 Mon Sep 17 00:00:00 2001 From: Joakim Persson Date: Sat, 13 Jul 2024 23:07:18 +0200 Subject: [PATCH] =?UTF-8?q?Gemensam=20kontroll=20f=C3=B6r=20stora=20och=20?= =?UTF-8?q?sm=C3=A5=20rutn=C3=A4tslinjer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- graphs/graph_2d.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/graphs/graph_2d.py b/graphs/graph_2d.py index eb3d5ec..8098110 100644 --- a/graphs/graph_2d.py +++ b/graphs/graph_2d.py @@ -10,21 +10,23 @@ fig, axs = plt.subplots(3, 1, figsize=(6, 8)) axs[0].plot(x, y) axs[0].set_title('Linear graph for y = x^2') # Enable grid lines for the linear graph -axs[0].grid(which='major', linestyle='-', linewidth=0.2, color='gray') -axs[0].grid(which='minor', linestyle='-', linewidth=0.2, color='gray') +# axs[0].grid(which='major', linestyle='-', linewidth=0.2, color='gray') # Control major grid lines +# axs[0].grid(which='minor', linestyle='-', linewidth=0.2, color='gray') # Control minor grid lines +axs[0].grid(which='both', linestyle='-', linewidth=0.2, color='gray') # Control major and minor grid lines axs[1].semilogx(x, y) axs[1].set_title('Linlog graph for y = x^2') # Enable grid lines for the linlog graph -axs[1].grid(which='major', linestyle='-', linewidth=0.2, color='gray') -axs[1].grid(which='minor', linestyle='-', linewidth=0.2, color='gray') +# axs[1].grid(which='major', linestyle='-', linewidth=0.2, color='gray') # Control major grid lines +# axs[1].grid(which='minor', linestyle='-', linewidth=0.2, color='gray') # Control minor grid lines +axs[1].grid(which='both', linestyle='-', linewidth=0.2, color='gray') # Control major and minor grid lines axs[2].loglog(x, y) axs[2].set_title('Loglog graph for y = x^2') # Enable grid lines for the loglog graph -axs[2].grid(which='major', linestyle='-', linewidth=0.2, color='gray') -axs[2].grid(which='minor', linestyle='-', linewidth=0.2, color='gray') - +# axs[2].grid(which='major', linestyle='-', linewidth=0.2, color='gray') # Control major grid lines +# axs[2].grid(which='minor', linestyle='-', linewidth=0.2, color='gray') # Control minor grid lines +axs[2].grid(which='both', linestyle='-', linewidth=0.2, color='gray') # Control major and minor grid lines plt.tight_layout() plt.show()