I'm using annotation_custom
to make a custom legend with arrows.
Unfortunately, all arrows seem to have a downward angle (heading South-West or North-East) and I'm striving to make an upward arrow (heading North-West).
Here is a reproducible example:
library(ggplot2)
library(grid)
x=ggplot() +
geom_blank() +
geom_rect(aes(xmin=1, xmax=2,
ymin=1, ymax=2)) +
coord_fixed(clip="off") #a plain old nice grey rectangle
my_arrow = linesGrob(arrow=arrow(type="open", ends="first", length=unit(4,"mm")))
x + annotation_custom(my_arrow, xmin=1.5,xmax=2.2, ymin=1.5,ymax=1.25) #South-West :-)
x + annotation_custom(my_arrow, xmin=1.5,xmax=2.2, ymin=1.25,ymax=1.5) #Also South-West :-(
How can I construct such an arrow?