Fix overlapping x-axis tick labels in the subspace figure

This commit is contained in:
2026-07-27 21:14:45 +09:00
parent 9ff3538682
commit b6d19b006a
+7
View File
@@ -138,6 +138,13 @@ for Um, c, mk, ls in ((2, "tab:orange", "s", "-."),
marker=mk, label=f"$U{{=}}{Um}$") marker=mk, label=f"$U{{=}}{Um}$")
ax.set_xlabel("paired calibration samples $N$") ax.set_xlabel("paired calibration samples $N$")
ax.set_ylabel("subspace recovery error") ax.set_ylabel("subspace recovery error")
# plain tick labels at the measured N values; suppress the crowded
# mantissa minor labels of the default log locator
from matplotlib.ticker import NullLocator
Ns_ticks = [200, 400, 800, 1600, 3200, 6400]
ax.set_xticks(Ns_ticks)
ax.set_xticklabels([str(n) for n in Ns_ticks])
ax.xaxis.set_minor_locator(NullLocator())
ax.grid(True, which="both", alpha=0.3) ax.grid(True, which="both", alpha=0.3)
ax.legend(loc="upper right", labelspacing=0.3) ax.legend(loc="upper right", labelspacing=0.3)
savefig(fig, "fig_e2_subspace.pdf") savefig(fig, "fig_e2_subspace.pdf")