title: One-lined legend (Error: Don't know how to add o to a plot)
body: <p>I would like to have the legend on top of my plot to be single-lined. I tried to use <code>guide_legend(nrow=1)</code> and <code>guides(fill=guide_legend(nrow=1,byrow=TRUE))</code> which both produce the same error <code>Error: Don't know how to add o to a plot</code></p>
  
  <p><strong>Example image</strong></p>
  
  <p><a href="https://i.stack.imgur.com/OwV5D.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OwV5D.png" alt="enter image description here"></a></p>
  
  <p>This is my code and data:</p>
  
  <pre><code>date = as.Date(c("2015-06-09","2015-06-09","2015-06-09","2015-06-09","2015-06-09","2015-06-09","2015-06-09, 2015-06-10","2015-06-10","2015-06-10","2015-06-10","2015-06-10","2015-06-10","2015-06-10","2015-06-10"))
  ph = c(8.1, 7.66, 6.71, 8.23, 8.23, 8.21, 7.9,8.1, 7.66, 6.71, 8.23, 8.23, 8.21, 7.9)
  step = c("Step1","Step2","Step3","Step4","Step5","Step6","Step7","Step1","Step2","Step3","Step4","Step5","Step6","Step7")
  
  df = data.frame(date,ph,step)
  
  df_plot &lt;- ggplot(df,aes(x=date, y=ph, group=step,color=step, shape=step)) +
    scale_shape_manual(values=c(1,2,3,4,5,6,7)) + geom_point(size=2) + geom_line() +
    theme(legend.position = "top") + guide_legend(nrow=1)
  </code></pre>
  
  <p>Any help would be much appreciated!</p>