[R] lattice: how to add points to the plot generated by levelplot()?

Walmes Zeviani walmeszeviani at hotmail.com
Thu Apr 1 01:06:48 CEST 2010


You can use

levelplot(runif(100)~rep(1:10, each=10)+rep(1:10, times=10))
trellis.focus("panel", 1, 1, highlight=FALSE)
 lpoints(runif(100,0,10), runif(100,0,10), pch=2, col=2, cex=2)
trellis.unfocus()

# or

levelplot(runif(100)~rep(1:10, each=10)+rep(1:10, times=10),
          panel=function(...){
            panel.levelplot(...)
            grid.points(runif(100,0,10), runif(100,0,10), pch=2)
          }
          ) 

Walmes

-----
..ooo0
...................................................................................................
..(....)... 0ooo...                              Walmes Zeviani
...\..(.....(.....)...     Master in Statistics and Agricultural
Experimentation
....\_)..... )../....       walmeszeviani at hotmail.com, Lavras - MG, Brasil
............
(_/............................................................................................
-- 
View this message in context: http://n4.nabble.com/lattice-how-to-add-points-to-the-plot-generated-by-levelplot-tp1747260p1747499.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list