From: Jonathan Rajotte Date: Fri, 26 Jul 2019 18:16:16 +0000 (-0400) Subject: Add y scale on the right side of plot X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=056f7519e4772cdd4636d386a5252d9e23866729;p=lttng-ci.git Add y scale on the right side of plot Signed-off-by: Jonathan Rajotte --- diff --git a/scripts/babeltrace-benchmark/benchmark.py b/scripts/babeltrace-benchmark/benchmark.py index 8dad781..518dce7 100644 --- a/scripts/babeltrace-benchmark/benchmark.py +++ b/scripts/babeltrace-benchmark/benchmark.py @@ -179,6 +179,7 @@ def plot_raw_value(branch, benchmark_type, x_data, y_data, labels, latest_values ) if l_result >= ymax: ymax = 1.2 * l_result + ax = plt.gca() plt.ylim(ymin=0, ymax=ymax) plt.xticks(x_data, labels, rotation=90, family="monospace") plt.title(graph_get_title(branch, benchmark_type), fontweight="bold") @@ -186,6 +187,9 @@ def plot_raw_value(branch, benchmark_type, x_data, y_data, labels, latest_values plt.xlabel("Latest commits") plt.legend() + # Put tick on the right side + ax.tick_params(labeltop=False, labelright=True) + plt.tight_layout() return @@ -243,10 +247,12 @@ def plot_ratio(branch, benchmark_type, x_data, y_data, labels, latest_values): plt.xlabel("Latest commits") plt.legend() + # Put tick on the right side + ax.tick_params(labeltop=False, labelright=True) + plt.tight_layout() return - def generate_graph(branches, report_name, git_path): # The PDF document