From 079f398a245b99560aacb07b32d83a4b86723e3f Mon Sep 17 00:00:00 2001 From: Youngjoon Lee <5462944+youngjoon-lee@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:30:56 +0900 Subject: [PATCH] do not use hard limit for y-axis of coeff. also smart max_y --- mixnet-rs/analysis/coeff.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mixnet-rs/analysis/coeff.py b/mixnet-rs/analysis/coeff.py index 82be17d..ad26a67 100644 --- a/mixnet-rs/analysis/coeff.py +++ b/mixnet-rs/analysis/coeff.py @@ -30,7 +30,6 @@ def analyze_versus(data: pd.DataFrame, x_field: str, outdir: str): max_y = 0 for field in fields: max_y = max(max_y, max_paramset_data[field].max()) - max_y = min(max_y, 5000) # hard limit for ax_row, field in enumerate(fields): for queue_type in max_paramset_data["queue_type"].unique(): @@ -52,7 +51,10 @@ def analyze_versus(data: pd.DataFrame, x_field: str, outdir: str): if ax_row == 0 and ax_col == len(all_fields) - 1: ax[ax_row][ax_col].legend(bbox_to_anchor=(1, 1), loc="upper left") ax[ax_row][ax_col].grid(True) - ax[ax_row][ax_col].set_ylim(-10, max_y * 1.05) + if max_y < 1e6: + ax[ax_row][ax_col].set_ylim(-10, max_y * 1.05) + else: + ax[ax_row][ax_col].set_ylim(bottom=-10) plt.tight_layout() fig.savefig(f"{outdir}/coeff_vs_{x_field}.png")