Re: [R] conditional plot

From: Chuck Cleland <ccleland_at_optonline.net>
Date: Wed 19 Jul 2006 - 19:13:53 EST

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@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

______________________________________________
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.
Received on Wed Jul 19 20:26:52 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 19 Jul 2006 - 22:16:57 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.