[R] specifying group plots using panel.groups

wintere ericawinter1 at gmail.com
Mon Nov 16 17:17:44 CET 2009


Hi, 

I am trying to plot two types of data on the same graph: points and
distributions. I am attempting to use the panel.groups function, but cannot
seem to get it to work. I have a melted data set and put in a FLAG column to
separate my data into the two groups that I would like to plot, point data
(FLAG=0) and the distribution(FLAG=1). Here is the code i am using in R: 

stripplot(
variable~value,
conf(RunlogBootCL), 
groups=FLAG,
panel=panel.superpose,
panel.groups=function(x,y, group.number, ...){
if(group.number==1)panel.xyplot(x,y, group.number...)
else if(group.number==0)panel.covplot(x,y, group.number...)},
ref=1,
cex = 0.5,
col="black",
main='Covariate Effects on Clearance',
xlab='relative clearance',
fill='transparent'
)

For some reason I can only get one or the other to plot!! (points or
distributions). Can you please direct me to my error?! thanks!


-- 
View this message in context: http://old.nabble.com/specifying-group-plots-using-panel.groups-tp26374674p26374674.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list