plot_elap: improve calculating y-range