Re: [R] RES: Multiple XY Lines Plot

From: Philipp Pagel <>
Date: Tue, 11 Nov 2008 21:27:49 +0100

> # prepare some example data
> x <- 1:25
> df <- data.frame(w1=x, w2=x+0.5, h1=x^2, h2=3*x+1.3)
> # use matplot to graph all data at once
> matplot(df[,c('w1','w2')], df[,c('h1','h2')], type='l', lty=c('solid', 'dotted'))

Oh - and matplot uses different line types anyway, so specifying lty is unnecessary, unless you don't like the default choice.



Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
85350 Freising, Germany

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 11 Nov 2008 - 20:33:22 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 11 Nov 2008 - 21:30:24 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive