If you want the absolute top-right, you can use x = Inf and y = Inf.
If you want slightly off the top-right I don't have any good
suggestions, except to manually compute the limits of each panel
(which is actually pretty easy with ddply)
Hadley
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
This works, although I do not understand it very well (e.g. the 'global'
fill is necessary in order to see the text ¿?)
Hope this helps,
fernando
library(ggplot2)
labs <- expression( , NC==17, PG, PG==13, R)
ggplot(data = movies, aes(x = rating, fill = NA)) +
geom_density(alpha = I(0.2), aes_string(fill = "mpaa")) +
scale_fill_discrete(name = "mpaa", breaks = levels(movies$mpaa),
labels = labs, formatter = parse) +
geom_text(x = Inf, y = Inf, label = "Test", hjust = 1, vjust = 1)
-----Mensaje original-----
De: ggp...@googlegroups.com [mailto:ggp...@googlegroups.com] En nombre de
Johannes Graumann
Enviado el: lunes, 28 de junio de 2010 22:13
Para: ggplot2
Asunto: Re: "annotate" in "topright" corner?
Me neither - I've open a bug report:
http://github.com/hadley/ggplot2/issues/issue/120
Hadley