0
$\begingroup$

I am to plot a bunch of numbers in a 3 by 3 manner.

However, some has 35 data line so when my code goes up to loop number 11 -> i.e. number of data plotted is 33, there is 2 remaining.

I wanted it to plot the remaining points into the last group.

How can I do that?

Data included here

Edit: Images here

There is an example here that after 11 rounds, there is still 2 points left. What I wanted is the remaining 2 points to be inserted into the last loop

$\endgroup$
2
  • $\begingroup$ Please provide a minimal example of input and desired output. It is not clear what are you after. $\endgroup$
    – Kuba
    Commented Feb 13, 2017 at 17:27
  • $\begingroup$ It is not clear what are you asking. $\endgroup$ Commented Feb 14, 2017 at 1:02

1 Answer 1

0
$\begingroup$

maybe something like this ? I am not sure to have understood correctly

list = RandomInteger[{1, 30}, 35];

newlist = 
  Flatten@Append[list, 
      Table[Null, Ceiling[Length@#, 3] - Length[#]]] &@list;
Manipulate[ListPlot[Take[newlist, 3*t]], {t, 1, Length@newlist/3, 1}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.