Re: [R] Multiple barplots on the same axis

From: John Kane <jrkrideau_at_yahoo.ca>
Date: Fri 13 Oct 2006 - 15:26:03 GMT

> Hi
>
> R newbie here :)
>
> I need to plot 3 barplots in the same axis,
> something like
>
> |
> | _ _ _
> | | | _ | | _ | | _
> | _ | || | _ | || | _ | || |
> | | || || | | || || | | || || |
> -+-----------------------------------------
> | v1 v2 v3
>
>
> Is there any documentation describing how to achieve
> that, and what data
> file layout would make the job easier?
>
> Thanks in advance,
> Andre

You might have a look at "Using R for Data Analysis and Graphics - Introduction, Examples and Commentary” by John Maindonald
and at
“An Introduction to S and the Hmisc and Design Libraries”
 by Carlos Alzola and Frank E. Harrell

Both are available on the R site : Follow the trail Other > Contributed documentation.

Are you aware of R Site Search
http://finzi.psych.upenn.edu/search.html?

To do what you want using traditional R graphics you should read up on par() Type ?par

Here is some really quick and dirty code that might help as a starting point.
aa<- 1:4

bb <- c(2,3,5,6)
cc <- c(4,5,6,7)
par(mfcol=c(1,3))
barplot(aa)

barplot(bb)
barplot(cc)

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 Sat Oct 14 02:31:08 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 Fri 13 Oct 2006 - 17:30:10 GMT.

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