Hi,
I am new to R. How can I get labels/different colours on the lines in my
xy-plots. I plot "het" against "temp" conditional on
"year" and "station".
library(lattice)
MyLines <- function(xi, yi, ...){ #Draws line in the panels while
avoiding spaghetti-plots
I <- order(xi)
panel.lines(xi[I], yi[I], col = 1)}
xyplot(het ~ temp | fstation, data = data1, groups = fyear, xlab =
"temp",
ylab = "heterocyst freq",
panel = panel.superpose, #ensures that lines from all years (defined by
"groups") from the same stations are superimposed in he same panel
panel.groups = MyLines) #specifies which task should be carried out on the
data defined by the "groups" option (here: "year")
When I call this, I cannot separate the lines from my different years. I
would like them to have different colours/other markings (irrelevant for me)
and identified on the side of the graph.
Thank's!
Anna Zakrisson Braeunlich
PhD Student
Department of Systems Ecology
Stockholm University
Svante Arrheniusv. 21A
SE-106 91 Stockholm
E-mail: anna@ecology.su.se
Tel work: +46 (0)8 161103
Mobile: +46-(0)700-525015
Web site: http://www.ecology.su.se/staff/personal.asp?id=163
><((((º>`•. . • `•. .• `•. . ><((((º>`•. . • `•. .•
`•. .><((((º>
[[alternative HTML version deleted]]