title: Plot multiple traces in R
body: <p>I started learning R for data analysis and, most importantly, for data visualisation. </p>
  
  <p>Since I am still in the switching process, I am trying to reproduce the activities I was doing with Graphpad Prism or Origin Pro in R. In most of the cases everything was smooth, but I could not find a smart solution for plotting multiple y columns in a single graph. </p>
  
  <p>What I usually get from the softwares I use for data visualisations look like this:</p>
  
  <p><a href="https://i.stack.imgur.com/dMga6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dMga6.png" alt="enter image description here"></a></p>
  
  <p>Each single black trace is a measurement, and I would like to obtain the same plot in R. In Prism or Origin, this will take a single copy-paste in a XY graph.</p>
  
  <p>I exported the matrix of data (one X, which indicates the time, and multiple Y values, which are the traces you see in the image).</p>
  
  <p>I imported my data in R with the following commands:</p>
  
  <pre><code>library(ggplot2) #loaded ggplot2
  
  Data &lt;- read.csv("Directory/File.txt", header=F, sep="") #imported data
  DF &lt;- data.frame(Data) #transformed data into data frame
  </code></pre>
  
  <p>If I plot my data now, I obtain a series of columns, where the first one (called V1) is the X axis and all the others (V2 to V140) are the traces I want to put on the same graph.</p>
  
  <p>To plot the data, I tried different solutions:</p>
  
  <pre><code>ggplot(data=DF, aes(x=DF$V1, y=DF[V2:V140]))+geom_line()+theme_bw() #did not work
  
  plot(DF, xy.coords(x=DF$V1, y=DF$V2:V140)) #gives me an error
  
  plot(DF, xy.coords(x=V1, y=c(V2:V10))) #gives me an error
  </code></pre>
  
  <p>I tried the <code>matplot</code>, without success, following the EZH guide: </p>
  
  <p>The code I used is the following: <code>matplot(x=DF$V1, type="l", lty = 2:100)
  </code> </p>
  
  <p>The only solution I found would be to individually plot a command for each single column, but it is a crazy solution. The number of columns varies among my data, and manually enter commands for 140 columns is insane.</p>
  
  <p>What would you suggest?</p>
  
  <p>Thank you in advance.</p>
  
  <p>Here there are also some data attached.<a href="https://dl.dropboxusercontent.com/u/36889/AP.txt" rel="nofollow noreferrer">Data: single X, multiple Y</a></p>