Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm not advanced in Mathematica but I'm trying to get better.

I have a big set of Data and I want to Plot the first row against the other ones. I tried to set the Rows into a list and run a "do loop" over all Rows.

My Code :

Data = Import["file", "Table"];
Time = Table[1/60 i, {i, 0, 1430}];
Rows[k_] = Do[List[Transpose[{Time, Data[[All, k]]}]], {k, 1, 16}]
Toplot = Do[Transpose[{Time, Rows[k]}], {k, 1, 16}];

I would be grateful for some help and tips.

share|improve this question
You should provide a sample of the Data :) – Öskå Jul 22 '14 at 9:15
Have a look at Part and Span. You will most likely not need a loop at all. Useful:… – Yves Klett Jul 22 '14 at 10:44
as a fundamental issue your Do loops should be Tables. The posted answer is better of course. – george2079 Jul 30 '14 at 12:31

First of all, you should avoid using variables names with capital letters : these correspond to built-in functions.

Then, if I understood correctly, you want to plot the rows of your data versus time. If so, the following code should work :

data = Import["file", "Table"];
time = Range[0, 143/6, 1/60];
ListPlot[Transpose[{time, #}] & /@ data]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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