The first point in your
ListPlot is {0,0}, which is fine. The last point is {Pi, 3.1^3} instead of {Pi, Pi^3}, and while this might seem like a small difference, it's noticeable with regard to the curve from
Plot.
Two possible solutions are to either generate the points as {
x,y} pairs, in which case you don't need
DataRange:
ListPlot[Table[{x, x^3}, {x, 0.0, Pi, 0.1}]]
or to use a setting for
DataRange that accurately reflects the range of
x-values for the data you're plotting:
ListPlot[Table[x^3, {x, 0.0, Pi, 0.1}], DataRange -> {0, 3.1}]