# ListPlot of Table comes back empty

I am trying to do something I assumed would be simple, but I'm hitting a roadblock and I don't know why. I have the following table:

Kerr = Table[{s[[i]]/m[[i]]^2, m[[i]]}, {i, 1, Length[m]}]


Where s and m are one-dimensional arrays of the same length, imported from data files. I'm combining them into the table named Kerr, and I want to plot that (with s/m^2 on the x axis and m on the y axis. The table looks like this:

When I try to do ListPlot[Kerr], the axes come back empty. I assume I'm doing something fundamentally wrong, but I've no idea what. Any ideas?

• try Kerr = Table[Flatten@{s[[i]]/m[[i]]^2, m[[i]]}, {i, 1, Length[m]}]; ListPlot[Kerr]? – kglr Oct 5 '19 at 11:04

## 1 Answer

Note, that every number in your Kerr list is bracketed with { }. ListPlot expects a list of the form: {{1,1},{2,4},{3,9}}. So you just have to remove that innermost brackets which, I think, comes from lists s &m.

I am not sure how they are written in your data files. You can try to rewrite your function in the following way:

Kerr = Table[{(s[[i]]/m[[i]]^2)[[1]], m[[i]][[1]]}, {i, 1, Length[m]}]

• That worked like a charm! Thanks a lot! – Sotiris Oct 5 '19 at 11:22