You want option
enlargelimits = false, which turns off the automatic enlargement of the range.
The standard setting of
true, which will automatically enlarges adds a percentage on to the highest/lowest values for both x- and y-axes. I'm afraid I don't know what percentage gets added, but I think it's around 10%. So for example if the maximum x value in the input was 10, the x-axis upper limit would be 11. The over all result is to produce a 'border' around the material.
enlargelimits = false means that
pgfplots sets the limits to the maximum/minimum values in the input. So in my example, the plot would stop at exactly 10.
Other options are to have one limit automatic (settings
lower), or to do things on an axis by axis basis (for example using `enlarge x limits). This is covered in the pgfplots manual, page 216.