title: Using multple geom_text with custom coordinates in ggplot2
body: <p>I want to add custom text to a predefined location into my ggplot.<br>
  I've searched at various places and I think I almost got it, but something in my code is not making it work properly.<br>
  Here is the sample data:</p>
  
  <pre><code>x &lt;- data.frame(Snapshot_Date = c(
    "2016-12-31",
    "2016-12-31",
    "2016-12-31",
    "2016-12-31",
    "2017-12-31",
    "2017-12-31",
    "2017-12-31",
    "2017-12-31"),
             NewExisting = c('Existing',
                        'Existing',
                        'New',
                        'New',
                        'Existing',
                        'Existing',
                        'New',
                        'New'
                        ),
             Product = c( 'CC',
                          'ETA',
                          'CC',
                          'ETA',
                          'CC',
                          'ETA',
                          'CC',
                          'ETA'
                        ),
             prop = c(0.2384310,
                      0.4268317,
                      0.2099592,
                      0.4991919,
                      0.2201962,
                      0.4729444,
                      0.1375661,
                      0.5504558)
      ,stringsAsFactors = F)
  x$Snapshot_Date &lt;- as.factor(x$Snapshot_Date)
  x$NewExisting &lt;- as.factor(x$NewExisting)
  </code></pre>
  
  <p>I have created a seperate <code>df</code> for the corrdinates, as recommended by various sites:  </p>
  
  <pre><code>facet_group &lt;- data.frame(NewExisting = c("Existing","New")) # order matters
  lable.coord &lt;- data.frame(
    x=c(-Inf,-Inf),y = c(Inf,Inf),
    facet_group,
    labs = c("lab1","label2"),
    hjust1 = c(0,0),
    vjust1 = c(1,1))
  </code></pre>
  
  <p>Now when I plot the graph I get an error:<code>Error in FUN(X[[i]], ...) : object 'Snapshot_Date' not found</code> </p>
  
  <pre><code>ggplot(x,aes(x = Product, y = prop, fill = Snapshot_Date)) +
    geom_col(position = position_dodge()) +
    facet_wrap(~NewExisting, ncol = 1, scales = "free") +
    geom_text(aes(label = percent(prop)),
              position = position_dodge(width = 0.9),
              vjust = -.5,
              cex = 4,
              colour = "black"
    )+ # works upto here
    geom_text(data = lable.coord, aes(
      x = x, y = y,
      label = labs,
      group = NULL,
      vjust = vjust1,
      hjust = hjust1
    )) 
  </code></pre>
  
  <p>The code appears to work upto just before the second use of <code>geom_text()</code>. It seems that using a different dataset is causing the problem.   </p>
  
  <p>If I adjust the code and move the <code>fill = Snapshot_date</code> to the <code>geom_col()</code> instead, then the graphs plots. But now it seems to ignore the <code>position = position_dodge(width = 0.9)</code> argument.  </p>
  
  <pre><code>ggplot(x,aes(x = Product, y = prop)) +
    geom_col(aes( fill = Snapshot_Date),position = position_dodge()) +
    facet_wrap(~NewExisting, ncol = 1, scales = "free") +
    geom_text(aes(label = percent(prop)),
              position = position_dodge(width = 0.9),
              vjust = -.5,
              cex = 4,
              colour = "black"
    )+
    geom_text(data = lable.coord, aes(
      x = x, y = y,
      label = labs,
      group = NULL,
      vjust = vjust1,
      hjust = hjust1
    )) 
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/lKBtC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lKBtC.png" alt="enter image description here"></a></p>
  
  <p>How do I keep the custom text in the corners and get it to show labels over the bars?  </p>
  
  <p>Thank you</p>