Supplying axis labels in separate vector ggplot2
<p>I have a data frame which includes 2 data variables. One which represents the x axis value, and the other which is the y axis value. I would like to plot these against a date variable.</p>

<p>To help explain, I would like the following plot, with the <code>Date</code> column to be the axis labels for the x and y axis. In addition, i would like to include a trend line which shows both gradients. (In reality, the data isn't as clean cut as this, however I would like it to detect if there is more than one linear trend). In this example, there is a linear relationship between x points <code>1:16</code> and y <code>10:160</code>, and x <code>17:32</code> and y <code>180:480</code>.</p>

<pre><code>dates=seq(as.POSIXct("2015-01-01"), as.POSIXct("2015-02-01"), by="day")
data1=c(1:32)
data2=c(seq(10,160,10), seq(180,480,20))

DF=data.frame(dates,data1,data2)

ggplot(DF, aes(data1,data2))+geom_line()
</code></pre>