In Stata I can add text to a plot at given coordinates, e.g.:
clear
set obs 10
gen x = rnormal()
gen y = rnormal()
twoway scatter y x, text(0.8 0.8 "Some text")
The result is "Some text" at coordinates (0.8, 0.8):
I want to add a similar annotation in Julia with Gadfly. I found Guide.annotation
that can add layers of graphs and I could not figure out how to apply it to text instead of shapes. The documentation mentions at the top:
Overlay a plot with an arbitrary Compose graphic.
but the Compose
link shows a website in Chinese.
How can I add a text label (or caption, or annotation) with Gadfly?