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$
  • 3
    $\begingroup$ ListLinePlot[Join[col1, col2, 2]] $\endgroup$ – b3m2a1 Feb 25 '19 at 9:27
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!

|improve this answer|||||
$\endgroup$
  • $\begingroup$ Thanks a lot :) $\endgroup$ – Wisdom Feb 25 '19 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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