3

I am trying to create an annotation and align it. If I use:

annotate("text", label = "atext", x = 1, y = 1)

the center of the text (the e) gets positioned at (1, 1). However, I'd like the left border of the text (the a) to be at (1, 1). How do I make this happen?

M--
  • 25,431
  • 8
  • 61
  • 93

1 Answers1

8

use hjust for horizontal justification.

annotate("text", label = "atext", x = 1, y = 1, hjust = 0)

Look at vjust and hjust for more information;

This is a graph that shows how different values of above parameters control justification (and angle).

hjust, vjust and angle

M--
  • 25,431
  • 8
  • 61
  • 93