Change labels
This commit is contained in:
parent
493bac88c3
commit
872b84d0d1
@ -62,9 +62,9 @@ def main():
|
||||
axs2[1].set(xlabel=r"t $(\mu s)$", ylabel = r"z $(\mu m)$")
|
||||
axs2[0].set(ylabel = r"z $(\mu m)$")
|
||||
|
||||
axs1[i].legend()
|
||||
axs1[i].legend(loc="upper right")
|
||||
# axs1[i].set_title(title)
|
||||
axs2[i].legend()
|
||||
axs2[i].legend(loc="upper right")
|
||||
# axs2[i].set_title(title)
|
||||
|
||||
fig1.savefig("../latex/images/phase_space_2_particles_x.pdf", bbox_inches="tight")
|
||||
|
||||
@ -27,10 +27,10 @@ def main():
|
||||
"32000_steps.txt",
|
||||
]
|
||||
labels = [
|
||||
r"4000 steps",
|
||||
r"8000 steps",
|
||||
r"16000 steps",
|
||||
r"32000 steps",
|
||||
r"$n_1$",
|
||||
r"$n_2$",
|
||||
r"$n_3$",
|
||||
r"$n_4$",
|
||||
]
|
||||
titles = [
|
||||
"Relative error for the RK4 method",
|
||||
@ -47,17 +47,17 @@ def main():
|
||||
max_err.append(max(r))
|
||||
axs1[i].plot(t, r, label=label)
|
||||
|
||||
axs1[i].set(ylabel = r"relative_error $(\mu m)$") # xlabel=r"t $(\mu s)$",
|
||||
axs1[i].set(ylabel = r"Relative error $(\mu m)$") # xlabel=r"t $(\mu s)$",
|
||||
|
||||
axs1[1].set_xlabel(r"t $(\mu s)$")
|
||||
axs1[i].legend()
|
||||
axs1[i].legend(loc="upper right")
|
||||
# axs1[i].set_title(title)
|
||||
|
||||
conv_rate = 1/3 * sum([np.log10(max_err[i+1]/max_err[i])/np.log10(.5) for i in range(3)])
|
||||
print(conv_rate)
|
||||
|
||||
# fig1.savefig("../latex/images/phase_space_2_particles_x.pdf")
|
||||
plt.show()
|
||||
fig1.savefig("../latex/images/relative_error.pdf")
|
||||
# plt.show()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Loading…
Reference in New Issue
Block a user