# Plotting two large columns

I have two large columns of data which both have a dimension of {2485,1}. Now I want to plot these two columns versus together. I have tried ListLinePlot[{col1, col2}] but it doesn't give the correct plot. I think that it draws both columns versus ordered numbers (1,2,3,...). However, I need a plot which its x-axis be col1 and its y-axis be col2. How can I obtain such a plot?

• No, it returns just an empty plot! – Wisdom May 1 '19 at 7:32
• It doesn't work! – Wisdom May 1 '19 at 7:44
• @Wisdom what is the error message? ListLinePlot[Transpose[{col1, col2}]] should work. – Picaud Vincent May 1 '19 at 7:46
• @PicaudVincent It doesn't return any error but an empty graph (namely just two axes). Is it possible my large data cause such a situation? – Wisdom May 1 '19 at 7:59
• @HighPerformanceMark Thanks a lot – Wisdom May 1 '19 at 8:00

## 1 Answer

ListLinePlot[Transpose[Flatten /@ {col1, col2}]]


The problem is that your col1 and col2 aren't lists, as you say, but rather they are $$2485\times1$$ matrices.

• Thanks, it workes, however, this command gives me a plot which has not the appropriate x-axis. Namely the correct x-axis starts by 613 and ends up by 0.000001 for example. this is while the obtained plot has an x-axis which starts at 0 and ends by 2.5! what is the problem? – Wisdom May 1 '19 at 8:39
• Have you tried PlotRange->All? – Roman May 1 '19 at 8:40
• Ohhh my god! it worked finally! Thanks a lot, dear Roman. I didn't know it is necessary to write the range because I thought that Mathematica includes all of my data. Thanks again – Wisdom May 1 '19 at 8:44
• You're welcome. Don't hesitate to up-vote and to accept the answer. – Roman May 1 '19 at 8:47
• another question: how can I tell Mathematica to compress some rigions of x-axis and expand some other regions? In fact, I want to enhance the resolution of my graph because the variations of my data are not the same on all x-axis – Wisdom May 1 '19 at 8:48