title: Plotting linear functions on a ggplot with log-log scales
body: <p>I would like to plot three functions on a log-log plot using ggplot2 (Ver 0.9.3.1) in R (Ver 3.0.2).  </p>
  
  <pre><code>y = x
  y = 0.5*x
  y = 1.5*x
  </code></pre>
  
  <p>I have tried a number of things but keep running into issues.  This includes reading into the stackoverflow question <a href="https://stackoverflow.com/questions/15144998/plotting-in-r-using-stat-function-on-a-logarithmic-scale">here</a>.</p>
  
  <p>An example of the what I would like to have is <a href="http://picpaste.com/loglogExample.png" rel="noreferrer">here</a>.  I generated that plot in Matlab.</p>
  
  <p>The following is a sample of code that I am working with but currently it does not dray anything.  Ultimately, I want to to be a layer on top of other data (which needs the log-log to show structure).</p>
  
  <pre><code>library(ggplot2)
  
  plot = ggplot()
  plot = plot + coord_cartesian(xlim = c(0.02, 300), ylim = c(0.035, 20))
  plot = plot + stat_function(data = data.frame(x=c(0,1000), y=c(0,1)), fun=function(x) {x}, aes(x,y), geom = "line", color = "blue")
  plot = plot + stat_function(data = data.frame(x=c(0,1000), y=c(0,1)), fun=function(x) {0.5*x}, aes(x,y), geom = "line", color = "red")
  plot = plot + stat_function(data = data.frame(x=c(0,1000), y=c(0,1)), fun=function(x) {1.5*x}, aes(x,y), geom = "line", color = "red")
  plot = plot + scale_x_log10() + scale_y_log10() + annotation_logticks()
  plot  
  </code></pre>