[R] lattice, add text to xyplot

Ivan Gregoretti ivangreg at gmail.com
Sat Jan 9 01:44:39 CET 2010


Hello listers,

Does anybody know how to add text to an xyplot without whipping out
the existing curve?
That's all.


For instance,

Lets say you generate a graph like this

A <- data.frame(x = rnorm(100), y = rnorm(100))
xyplot(y ~ x, data = A)

How would you add 'Hello world'?

I tried 6.02E23 different partial solutions found on the web and
failed. I just need one EXAMPLE that WORKS.

Unfortunately,

library(lattice)
?panel.text

shows no examples.

As you see, I bring you a formidable challenge.

Thank you,

Ivan

Ivan Gregoretti, PhD
National Institute of Diabetes and Digestive and Kidney Diseases
National Institutes of Health
5 Memorial Dr, Building 5, Room 205.
Bethesda, MD 20892. USA.



More information about the R-help mailing list