# How to Obtain a ListPlot in each loop of Do[]. BUT not a list of plots after the DO[] [duplicate]

I´m trying to obtain ListPlot inside a DO loop but, always I can see the final semicolon in red, and the code runs well except the PLOTS.

How can I obtain the ListPlots in each iteration?

a = {};
Do[
sa = {{RandomInteger + 1,
RandomInteger + 1}, {RandomInteger + 1,
RandomInteger + 1}, {RandomInteger + 1,
RandomInteger + 1}};
AppendTo[a, sa];
Print["sa-> ", sa, " and a = ", a];
ListPlot[a, PlotRange -> {{0, 10}, {0, 10}}];
ListPlot[sa, PlotRange -> {{0, 10}, {0, 10}}];
Print["iter= ", i]
, {i, 1, 3}
]


After reading some of the posts in the first link of DUPLICATE, I modify with this code(in an easy way), but I think that the solutions are not suitable when in each iteration you want to write many data and the Plot is only ONE (but not the main purpose). You can supose you want to print 15 lineas of data and a plot in each iteration, similar to , as the sketch after the next code. If you obtain all the plots at the final in a Table is not so useful. (I think that Mathematica is so complicated for any simple things.)

a = {};
plota = {};
plotsa = {};
Do[
sa = {{RandomInteger + 1,
RandomInteger + 1}, {RandomInteger + 1,
RandomInteger + 1}, {RandomInteger + 1,
RandomInteger + 1}};
costesa = coste[sa];
AppendTo[a, sa];
Print["sa-> ", sa, " and a = ", a];
(*sp=ListPlot[a,PlotRange\[Rule]{{0,10},{0,10}}];*)
AppendTo[plota, ListPlot[a, PlotRange -> {{0, 10}, {0, 10}}]];
AppendTo[plotsa, ListPlot[sa, PlotRange -> {{0, 10}, {0, 10}}]];
Print["iter= ", i]
, {i, 1, 3}
]
plota
plotsa • Just use Print. Feb 16 '15 at 20:28
• @SjoerdC.deVries :-) Yes!. Just.... Thank you very much. You have really solve my question. QUESTION SOLVED! Feb 16 '15 at 21:21

Here is an alternative approach (apologies if I have misinterpreted the desired output)

With[{pr = Table[{0, 10}, {2}]},
Column[#, Frame -> All] & /@ Transpose[{MapIndexed[
Column[{ListPlot[#1,
PlotLabel -> "Iteration" <> ToString@First@#2,
PlotRange -> pr, Frame -> True], #1}]
&, #],
Column[{ListPlot[#, PlotRange -> pr, Frame -> True], #}] & /@
FoldList[Join[#1, #2] &, First@#, Rest@#]} &@
RandomInteger[{1, 10}, {3, 3, 2}]]] • Thank you. But what I want is printing a ListPlot in each iteration inside a Do[] and other data. The List Plot is only one of the data I want. Feb 16 '15 at 18:23