smarter choice of y-axis range