Skip to content
Prev 365852 / 398502 Next

scatter plot of numerical variables against different sample ids

You can also try using ggplot2 to generate the plot:
Shawn Way, PE

-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Jim Lemon
Sent: Monday, December 05, 2016 3:02 PM
To: Maria Lathouri <mlathouri at yahoo.gr>
Cc: R-help Mailing List <r-help at r-project.org>
Subject: Re: [R] scatter plot of numerical variables against different sample ids

Hi Maria,
Perhaps something like this:

 mldf<-read.table(text="Sample  Cu  Zn Mn
 M1 1  5  10
 M2  2.5  11   8
 M3 1.15  11  12
 M4  2  4  30
 M5  8  15 35",
 header=TRUE)
 matplot(mldf,type="b",pch=c("C","Z","M"))

Jim
On Mon, Dec 5, 2016 at 11:25 PM, Maria Lathouri via R-help <r-help at r-project.org> wrote:
______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.