Robert Weenink <[EMAIL PROTECTED]> writes: > I'm a fairly new user of R and I'm confronted with a problem to which I can't > find the solution in any R manual or FAQ. > > I'd like to plot multiple 'graphs' in one plot screen. For example, my data > frame would be: > > x a b c > 1 11 15 18 > 2 26 12 19 > 3 22 17 14 > > And I'd like to plot a, b and c against x at the same time in one plot screen. > > How is this done?
With matplot(). There are various possibilities, e.g. > dd <- read.table(stdin(),header=TRUE) 0: x a b c 1: 1 11 15 18 2: 2 26 12 19 3: 3 22 17 14 4: > > matplot(dd$x,dd[-1],type="b") (and you don't actually need the dd$x bit because it will plot against the index if no x is given). -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
