[R] lattice and display
Nolwenn Le Meur
nolwenn.lemeur at nantes.inserm.fr
Thu Dec 19 15:43:04 CET 2002
Hi,
I have just started using lattice and it looks great. But I already have 3
questions about xyplot display.
----------------------------------------------------------------------------
---------------------------------
1.I would like to create two differeny xyplot with different color to
identify my different groups but I have trouble applying colors.
Here are the scripts
xyplot(resultdata$Y~resultdata$X , data=resultdata,groups=resultdata$Block,
panel="panel.xyplot",
panel.groups="panel.xyplot",
xlab="X",ylab="Y",pch="*",
col.groups=trellis.par.get("superpose.symbol")$col[1:6],cex=2,
key=list(space="right",
points=list(pch="*",
col=trellis.par.get("superpose.symbol")$col[1:6]),
text=list(paste("Block",1:6)))
)
xyplot(resultdata$Y~resultdata$X |resultdata$Block, data=resultdata,
xlab="X",ylab="Y",
col.groups=trellis.par.get("superpose.symbol")$col[1:6],cex=2,
key=list(space="right",
points=list(pch=trellis.par.get("superpose.symbol")$pch[1:6],
col=trellis.par.get("superpose.symbol")$col[1:6]),
text=list(paste("Block",1:6)))
)
----------------------------------------------------------------------------
-------------------------------
2.For the latest formula I would also like to change the resultdata$Block
label by the corresponding "Block x".
----------------------------------------------------------------------------
-------------------------------
3.I finally would like to save my plot as "jpg" files under Linux but I
loose the color.
Thanks,
Nolwenn
********************************************
Nolwenn Le Meur
INSERM U533
Faculté de médecine
1, rue Gaston Veil
44035 Nantes Cedex 1
France
Tel: (+33)-2-40-41-29-86 (office)
(+33)-2-40-41-28-44 (secretary)
Fax: (+33)-2-40-41-29-50
mail: nolwenn.lemeur at nantes.inserm.fr
********************************************
More information about the R-help
mailing list