| import numpy as np |
| import matplotlib.pyplot as plt |
|
|
| |
| candidates = np.array([1, 5, 10, 20, 30]) |
| achieved_accuracy = np.array([59.17, 63.75, 64.73, 62.91, 62.78]) |
| upper_bound = np.array([59.17, 69.6, 72.7, 76, 77.8]) |
| lower_bound = np.array([59.17, 59.17, 59.17, 59.17, 59.17]) |
|
|
| |
| fig_width = 4 |
| fig_height = fig_width * 0.75 |
|
|
| |
| plt.figure(figsize=(fig_width, fig_height), dpi=300) |
|
|
| |
| plt.plot(candidates, upper_bound, label="Upper Bound", linestyle="--", color="red") |
| plt.plot(candidates, achieved_accuracy, label="MATS", marker="o", color="blue") |
| plt.plot(candidates, lower_bound, label="Lower Bound", linestyle="--", color="green") |
|
|
| |
| plt.fill_between(candidates, achieved_accuracy, upper_bound, color="gray", alpha=0.3) |
| plt.fill_between(candidates, lower_bound, achieved_accuracy, color="gray", alpha=0.3) |
|
|
| |
| plt.xlabel("Number of Candidates", fontsize=10) |
| plt.ylabel(r"EX\%", fontsize=10) |
| plt.xticks(candidates, fontsize=9) |
| plt.yticks(fontsize=9) |
| plt.legend(fontsize=9, loc="upper left") |
| plt.grid(True, linewidth=0.5) |
|
|
| |
| plt.gca().spines["top"].set_visible(False) |
| plt.gca().spines["right"].set_visible(False) |
|
|
| |
| plt.savefig("accuracy_vs_bounds.pdf", bbox_inches="tight", format="pdf") |
|
|
| |
| plt.show() |
|
|