Skip to content

Commit

Permalink
ylim the time axis at 0
Browse files Browse the repository at this point in the history
  • Loading branch information
ogrisel committed Apr 19, 2023
1 parent 8e3e4ee commit 85b1d26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions benchmarks/bench_grid_search_scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def get_file_name(name):
label = args.name or "current"
plt.fill_between(res[0], res[2], res[3], alpha=0.3, color="C0")
plt.plot(res[0], res[1], c="C0", lw=2, label=label)
max_time = res[3].max()

if args.compare:
for i, name_c in enumerate(args.compare):
Expand All @@ -89,8 +90,10 @@ def get_file_name(name):
res_c[0], res_c[2], res_c[3], alpha=0.3, color=f"C{i+1}"
)
plt.plot(res_c[0], res_c[1], c=f"C{i+1}", lw=2, label=name_c)
max_time = max(max_time, res_c[3].max())

plt.xlabel("n_jobs")
plt.ylabel("Time [s]")
plt.ylim(0, max_time)
plt.legend()
plt.show()

0 comments on commit 85b1d26

Please sign in to comment.