# Combining multiple ListPlot with different abscissas

I have a complicated function and my computer crashes when I try to plot it using ListPlot from 0 to 30.

So what I want to do is instead of plotting the function from 0 to 30, I cut it into segments, i.e. 0 to 3, 3 to 6, and so on, then I want to combine all these segments.

How do I combine these segments?

Thank you

• Do you understand why it crashes? Oct 17, 2016 at 5:34
• I think my computer crashes because it ran out of memory Oct 17, 2016 at 5:40
• This is how to do what you asked. list1 = Table[{x, x^2}, {x,0,3}]; list2 = Table[{x, x^2}, {x,3,6}]; list3 = Table[{x, x^2}, {x,6,9}]; ListPlot[{list1, list2, list3}] but I question whether that will really solve your problem.
– Bill
Oct 17, 2016 at 5:59
• I tried this and it works. Thanks! How do I make the different segments into the same color and linestyle? Oct 17, 2016 at 6:01
• Study this hint: ListPlot[{list1, list2, list3}, PlotStyle -> Red]
– Bill
Oct 17, 2016 at 6:11

You can use Show with PlotRange->All
plots = Table[ListPlot[Table[{x, Sin[x]}, {x, a, a + 2, 0.1}],

Show[plots, PlotRange -> All]