axis names
This commit is contained in:
parent
d5c8f3bfc9
commit
6b1f294d09
4
main.py
4
main.py
@ -84,7 +84,6 @@ def plot_curves(alpha_values, pagerank_iterations, gauss_seidel_iterations, page
|
|||||||
# 1: Number of iterations
|
# 1: Number of iterations
|
||||||
ax1.plot(alpha_values, pagerank_iterations, label="PageRank Iterations", color="blue")
|
ax1.plot(alpha_values, pagerank_iterations, label="PageRank Iterations", color="blue")
|
||||||
ax1.plot(alpha_values, gauss_seidel_iterations, label="Gauß-Seidel Iterations", color="red")
|
ax1.plot(alpha_values, gauss_seidel_iterations, label="Gauß-Seidel Iterations", color="red")
|
||||||
ax1.set_xlabel("α")
|
|
||||||
ax1.set_ylabel("Number of Iterations")
|
ax1.set_ylabel("Number of Iterations")
|
||||||
ax1.set_title("Iterations vs. α")
|
ax1.set_title("Iterations vs. α")
|
||||||
ax1.legend()
|
ax1.legend()
|
||||||
@ -93,7 +92,6 @@ def plot_curves(alpha_values, pagerank_iterations, gauss_seidel_iterations, page
|
|||||||
# 2: Execution time
|
# 2: Execution time
|
||||||
ax2.plot(alpha_values, pagerank_times, label="PageRank Time", color="blue")
|
ax2.plot(alpha_values, pagerank_times, label="PageRank Time", color="blue")
|
||||||
ax2.plot(alpha_values, gauss_seidel_times, label="Gauß-Seidel Time", color="red")
|
ax2.plot(alpha_values, gauss_seidel_times, label="Gauß-Seidel Time", color="red")
|
||||||
ax2.set_xlabel("α")
|
|
||||||
ax2.set_ylabel("Time (seconds)")
|
ax2.set_ylabel("Time (seconds)")
|
||||||
ax2.set_title("Execution Time vs. α")
|
ax2.set_title("Execution Time vs. α")
|
||||||
ax2.legend()
|
ax2.legend()
|
||||||
@ -103,7 +101,7 @@ def plot_curves(alpha_values, pagerank_iterations, gauss_seidel_iterations, page
|
|||||||
ax3.plot(alpha_values, diff_norms, label="Difference Norm", color="green")
|
ax3.plot(alpha_values, diff_norms, label="Difference Norm", color="green")
|
||||||
ax3.set_xlabel("α")
|
ax3.set_xlabel("α")
|
||||||
ax3.set_ylabel("Norm Difference")
|
ax3.set_ylabel("Norm Difference")
|
||||||
ax3.set_title("Difference Norm between PageRank and Gauß-Seidel vs. α")
|
ax3.set_title("Norm Difference between PageRank and Gauß-Seidel vs. α")
|
||||||
ax3.legend()
|
ax3.legend()
|
||||||
ax3.grid(True)
|
ax3.grid(True)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user