title: Scatterplot: Error in FUN(X[[i]], ...) : object 'Group' not found
body: <p>I'm trying to plot some data using <em>ggplot</em> and I'm having some problems with the significant lines and asterisk.</p>
  
  <p>This is the code I am using: </p>
  
  <pre><code>p &lt;- ggplot(Hematoxilin_tumor_necrosis, aes(x=total, y=necro, colour = Group))+
    labs(y="Necrotic area",x="Total area")+
    theme_minimal()
  
  path = data.frame(x=c(78,79,79,78),y=c(22,22,34,34))
  
  p + geom_point(size=0.7)+
    geom_smooth(method=lm, se = F, size=0.8) +
    scale_color_manual(values=c("#999999","#333333"))+
    #Adding asterisks
    geom_path(data = path, aes(x = x,y = y)) +
    annotate("text",x = 80, y = 27, label="*", cex=7)
  </code></pre>
  
  <p>Which gives me the following error:</p>
  
  <blockquote>
    <p>Error in FUN(X[[i]], ...) : object 'Group' not found</p>
  </blockquote>
  
  <p>I know that the problem is in the <code>geom_path(data = path, aes(x = x,y = y))</code> but I am kind of lost. I am new in ggplot so I expect some simple problem.</p>
  
  <p>Any advice?</p>