0

To illustrate my problem, I have provided the plot below:

enter image description here

My question is thus: Is there are way to bring the labels (made with geom_labels) on top of the lines? I have tried hjust and vjust, but no combination of those two solves it.

zx8754
  • 52,746
  • 12
  • 114
  • 209
JMG
  • 1
  • 1
  • 2
    Welcome to Stack Overflow! Please read the info about [how to ask a good question](http://stackoverflow.com/help/how-to-ask) and how to give a [reproducible example](http://stackoverflow.com/questions/5963269). This will make it much easier for others to help you. – zx8754 Mar 15 '16 at 15:33
  • 4
    You need to rearrange the layers, `ggplot() + geom_line() + .. + geom_labels()` – erc Mar 15 '16 at 15:40
  • 1
    `ggplot` will always put the last added layer on top. – Axeman Mar 15 '16 at 16:05
  • You have to create a set of vector for `hjust` and `vjust` to give placement for each of the point seperately and use that vector. – TheRimalaya Mar 15 '16 at 21:19
  • @beetroot Thank you so much, it worked like a charm! – JMG Mar 16 '16 at 07:42
  • @Axeman Thanks, I am not that new to ggplot, however I didn't know it did that. Again, thanks! – JMG Mar 16 '16 at 07:42
  • @zx8754 Thank you for the link, I will give it a read! :) – JMG Mar 16 '16 at 07:43

0 Answers0