[R] barplot with

Jonathan Baron baron at cattell.psych.upenn.edu
Wed Jul 3 17:31:19 CEST 2002


On 07/03/02 17:00, Nicolas Schneider wrote:
>Dear R-users
>
>I have data measured at 8 locations (1-8) with 3 variables each (only 1 time 
>step). I would like to sumarize the results in one barplot figure, i.e. creating 
>a kind of multi-variable barplot (see below). Thus, at each location, the three 
>variables should be compared with each other. Does anyone have an idea how to 
>draw a figure like that? 

Set up your data as a matrix m1 (for example) with columns 1, 2,
3... 8 and one row for each variable.  Then say something like

barplot(m1,beside=T,...)

Look up the help for barplot.  The trick is to use "beside".

>Many thanks in advance,
>Nicolas
>
>
>A     _                         _
>|   _| |            _         _| |
>|  | | |           | |_      | | |
>|  | | |           | | |     | | |
>|------------------------------------------------>
>|       | |     |_|              | |
>|       |_|                      |_| 
>|        
>|
>V     1             2           3        ...    8    (locations)

-- 
Jonathan Baron, Professor of Psychology, University of Pennsylvania
R page:               http://finzi.psych.upenn.edu/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list