Hi, Can anyone pls help me in plotting the following data? The data-set contains company name, specification-1, specification-2. The graph would basically plot company name with specification-1 on x-axis, & specification-2 on y-axis. Simply put - company name should get classified into one of the four quardrants created by specification 1 & specification2. Thanks. Manoj
Manoj wrote:> Hi, > Can anyone pls help me in plotting the following data? > > The data-set contains company name, specification-1, specification-2. > > The graph would basically plot company name with specification-1 > on x-axis, & specification-2 on y-axis. > > Simply put - company name should get classified into one of the > four quardrants created by specification 1 & specification2.You could do something along these lines, replacing LETTERS with your company names: df <- data.frame(SPEC1 = runif(26), SPEC2 = runif(26), COMPANY = LETTERS) par(lab=c(10,10,7), las=1) plot(df$SPEC1, df$SPEC2, type="n", xlab="Specification 1", ylab="Specification 2", ylim=c(0,1), xlim=c(0,1)) text(df$SPEC1, df$SPEC2, df$COMPANY) axis(side=1, at = .5, tck=1, col="grey", lty=2) axis(side=2, at = .5, tck=1, col="grey", lty=2)> Thanks. > > Manoj > > ______________________________________________ > R-help at stat.math.ethz.ch 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.-- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894
does this do what you want? x <- data.frame(company=LETTERS, spec1=runif(26), spec2=runif(26)) plot(range(x$spec1), range(x$spec2), type='n') abline(v=.5, h=.5) text(x$spec1, x$spec2, labels=x$company) On 7/19/06, Manoj <manojsw@gmail.com> wrote:> > Hi, > Can anyone pls help me in plotting the following data? > > The data-set contains company name, specification-1, specification-2. > > The graph would basically plot company name with specification-1 > on x-axis, & specification-2 on y-axis. > > Simply put - company name should get classified into one of the > four quardrants created by specification 1 & specification2. > > Thanks. > > Manoj > > ______________________________________________ > R-help@stat.math.ethz.ch 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. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve? [[alternative HTML version deleted]]