The current autoscale logic has no consideration for a margin, which makes for very unclear plots in some cases. For instance, look at the output of this:
gnuplot -persist -e 'plot sgn(sin(x))'
This is a square wave, but the top/bottom edges lie exactly at the plot boundary, so you can't see them. The current autoscale code expands the view to the next tic. In this case, the curve edges lie on a tic exactly, causing the problem. I'm attaching a patch that adds a 10%-of-tic margin to the autoscale logic.