Skip to content
Snippets Groups Projects
Commit 9af8e2bb authored by Manuel Marschall's avatar Manuel Marschall
Browse files

fixed ylim issue in prior plot

parent c39bbf8c
No related branches found
No related tags found
No related merge requests found
Pipeline #3782 passed
...@@ -218,7 +218,7 @@ def validate(experiment: str): ...@@ -218,7 +218,7 @@ def validate(experiment: str):
unc_std = np.std(res['unc'], ddof=1) unc_std = np.std(res['unc'], ddof=1)
acc_rate = np.mean(res["acc_rate"]) acc_rate = np.mean(res["acc_rate"])
print(f"{res['k0']} {res['nu0']} {mean:.5g} +- {mean_std:.2e} {unc:.5g} +- {unc_std:.2e}" print(f"{res['k0']} {res['nu0']} {mean:.5g} +- {mean_std:.2e} {unc:.5g} +- {unc_std:.2e}"
f"{acc_rate:.4e}") f" {acc_rate:.4e}")
if __name__ == "__main__": if __name__ == "__main__":
......
...@@ -97,6 +97,8 @@ def plot_x(xbar: float, ...@@ -97,6 +97,8 @@ def plot_x(xbar: float,
ax1.set_xlim(xlim) ax1.set_xlim(xlim)
if ylim is not None: if ylim is not None:
ax1.set_ylim(ylim) ax1.set_ylim(ylim)
else:
ax1.set_ylim(bottom=0)
plt.tight_layout() plt.tight_layout()
return fig return fig
...@@ -181,7 +183,8 @@ def plot_result_pdfs(sampler_dict: dict, ...@@ -181,7 +183,8 @@ def plot_result_pdfs(sampler_dict: dict,
ax1.legend(fontsize=12) ax1.legend(fontsize=12)
# plt.title(f"Y mean offset: {m_off:.4g}, Y noise faktor: {s_off:.2g}", fontsize=14) # plt.title(f"Y mean offset: {m_off:.4g}, Y noise faktor: {s_off:.2g}", fontsize=14)
if xlim is not None: if xlim is not None:
plt.xlim(xlim) ax1.set_xlim(xlim)
ax1.set_ylim(bottom=0)
ax1.set_xlabel("measurand Y [a.u.]") ax1.set_xlabel("measurand Y [a.u.]")
ax1.set_ylabel("Probability density") ax1.set_ylabel("Probability density")
plt.tight_layout() plt.tight_layout()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment