It may depend on what you would like to achieve visually with your plot.
I'll create some fake data to represent yours:
distanceplot = Table[{x, 2 x}, {x, 0, 100, 1}];
Here are two ways to achieve what you asked, which lead to somewhat different results
The first example, which I suggested in the comments, provides an explicit limit for the horizontal plot range. The vertical plot range is determined automatically by ListPlot
, taking into consideration all your data:
ListPlot[distanceplot, PlotRange -> {{0, 10}, Automatic}, PlotRangePadding -> Scaled[0.05]]

As you can see, the vertical range goes all the way to 200, because that is the range encompassed by the full dataset. If this behavior is undesirable, you could a) give an explicit value for the $y$ range as well, or b) pre-select the data that you feed to ListPlot
with e.g. Cases
:
ListPlot[Cases[distanceplot, {x_, y_} /; 0 <= x <= 10], PlotRangePadding -> Scaled[0.05]]

In this case, we don't need to fiddle with the PlotRange
at all: we simply feed only the data to be plotted to ListPlot
, and let it do its internal magic to determine the appropriate PlotRange
for this subset.
Note that, using this approach, you can filter your data any way you want. Suppose that you wanted only those points $10\le x \le 45$ for which $x$ is a prime number; you could then write:
ListPlot[
Cases[distanceplot, {x_, y_} /; 10 <= x <= 45 && PrimeQ[x]],
PlotRangePadding -> Scaled[0.05], AxesOrigin -> {0, 0}
]

PlotRange -> {{0, 10}, Automatic}
? What do you use in the case ofPlot
, and how does it fail? $\endgroup$