[R] Question about panel.points

Ptit_Bleu ptit_bleu at yahoo.fr
Wed Sep 17 11:55:33 CEST 2008


Hello,

I'm trying to plot graphs using lattice with this script :

xyplot(Y ~ X | factmod,
panel = function(x, y) {
                panel.grid(h=-1, v=-1, col="gray")
                panel.xyplot(x, y, type="p", pch=20)
                panel.points(50,Idata, data=devdata, col="red")   ----->
this doesn't work
                },
                 xlab="X", ylab="Y")

factmod is a factor with 18 labels corresponding to the 18 names of my
devices.
devdata is a data.frame of 2 columns and 18 rows : name of the devices /
value of Idata for each device
For example (smaller one):
devdata<-data.frame(c("a","b","c","d"), c(1,5,9,7))

And I would like to add the point (50, Idata) per graph that is 
points(50,1) on the first graph
points(50,5) on the second graph, ...

At the moment, it plots all the points on every graph (or with another
command, only (50,Idata[1]) on all the graphs).

Could you please give me a little piece of advice to solve this problem ?
Thanks in advance,
Ptit Bleu.

-- 
View this message in context: http://www.nabble.com/Question-about-panel.points-tp19528504p19528504.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list