Skip to content
Prev 334445 / 398506 Next

plot two columns against one

or for a different view

library(lattice)

xyplot(B+C ~A, data = s, 
            outer = T, 
           scales = list(relation = "free"), 
          pch = as.numeric(rownames(s)), 
          col = as.numeric(rownames(s)))

Duncan

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mackay at northnet.com.au


-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of arun
Sent: Sunday, 15 December 2013 04:30
To: R help
Subject: Re: [R] plot two columns against one

Hi Eliza,
Try:


ggplot(s,aes(x=A,y=B))+geom_point(colour="white",shape=21,size=4,aes(fill=fa
ctor(C)))+theme_bw()+theme(legend.position="none")
A.K.






On Saturday, December 14, 2013 12:29 PM, eliza botto
<eliza_botto at hotmail.com> wrote:
Dear Arun and david,
Thanks for your reply. If instead of text i want to add points, what change
in code should occur?

eliza
<eliza_botto at hotmail.com> wrote:
______________________________________________
R-help at 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.