title: How do you plot two vectors on x-axis and another on y-axis in ggplot2
body: <p>I am trying to plot two vectors with different values, but equal length on the same graph as follows:</p>
  
  <pre><code>a&lt;-23.33:52.33
  b&lt;-33.33:62.33
  days&lt;-1:30
  
  df&lt;-data.frame(x,y,days) 
  
        a   b    days
   1    23.33 33.33    1
   2    24.33 34.33    2
   3    25.33 35.33    3
   4    26.33 36.33    4
   5    27.33 37.33    5
   etc..
  </code></pre>
  
  <p>I am trying to use ggplot2 to plot x and y on the x-axis and the days on the y-axis. However, I can't figure out how to do it. I am able to plot them individually and combine the graphs, but I want just one graph with both a and b vectors (different colors) on x-axis and number of days on y-axis.</p>
  
  <p>What I have so far:</p>
  
  <pre><code>X&lt;-ggplot(df, aes(x=a,y=days)) + geom_line(color="red")
  Y&lt;-ggplot(df, aes(x=b,y=days)) + geom_line(color="blue")
  </code></pre>
  
  <p>Is there any way to define the x-axis for both a and b vectors? I have also tried using the melt long function, but got stuck afterwards. </p>
  
  <p>Any help is much appreciated. Thank you</p>