Consider this list plot
ls = Table[Sin[t], {t, 0, 100, 0.1}];
p = ListPlot[ls, PlotRange -> {{0., 0.1}, All}, DataRange -> {0, 1}, Joined -> True]
![enter image description here][1]
If we look at the data in the plot, we see that all the data in `ls` are included in the plot.
ls2 = p[[1, 2, 1, 3, 3, 1]];
Dimensions[ls2]
(* {1001, 2} *)
ListPlot[ls2, Joined -> True]
![enter image description here][2]
Sometimes this is really helpful because we can just retrieve the data at a later time from the plots and don't need to regenerate the data again. But sometimes I'm only intreated in the range set in the ListPlot, and saving all the data is kindly of wasting of space, especially when I have many plots in a notebook, the notebook size becomes very large and not very responsive.
So are there simple ways to tell `ListPlot` to not include the data outside the plot range, other than manually select the data before plot?
P.S. Sometimes, ListPlot does drop the data outside the range, see example [here][3].
[1]: https://i.sstatic.net/8wlGZ.jpg
[2]: https://i.sstatic.net/mvGPJ.jpg
[3]: http://mathematica.stackexchange.com/questions/38576/extracting-data-values-from-a-plot