0
$\begingroup$

If I have two columns of data 1 and 2 col1={{1},{2},{3}}and col2={{4},{5},{6}} which each of them has 3 rows for example, what is the easiest way to plot col1 versus col2?

$\endgroup$
1
  • 3
    $\begingroup$ ListLinePlot[Join[col1, col2, 2]] $\endgroup$
    – b3m2a1
    Feb 25, 2019 at 9:27

1 Answer 1

2
$\begingroup$

Try this:

col1 = {{1}, {2}, {3}} // Flatten;
col2 = {{4}, {5}, {6}} // Flatten;
ListPlot[Transpose[{col1, col2}]]

yielding the following plot:

enter image description here

Have fun!

$\endgroup$
1
  • $\begingroup$ Thanks a lot :) $\endgroup$
    – Wisdom
    Feb 25, 2019 at 12:17

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.