Philipp, I would do the following with ggplot2:
# Set up data require(ggplot2) dat <- Orange dat$group <- ifelse(dat$Tree%in%c('1','4','5'), 'A', 'B') # Specify the ggplot group aesthetic as Tree g1 <- ggplot(data = dat, aes(x = age, y = circumference, group=Tree)) # Specify the geom_point and geom_line colour aesthetics as group g1 + geom_point(aes(colour = group)) + geom_line(aes(colour = group)) Is this what you are after? Jeremy Jeremy Hetzel Boston University [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.