Re: [R] barplot

Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
25 Feb 1999 18:09:50 +0100

To: Lorenz Gygax <lgygax@access.unizh.ch>
Subject: Re: [R] barplot
From: Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk>
Date: 25 Feb 1999 18:09:50 +0100
In-Reply-To: Lorenz Gygax's message of Thu, 25 Feb 1999 17:31:28 +0100 (MET)

Lorenz Gygax <lgygax@access.unizh.ch> writes:

> Dear all,
>
> just a short note on how I solved my problem to display positive and
> negative values in the same bar in a barplot (it is really quick and dirty
> but it looks ok): I basically made two barplots one with the positive
> values and one with the negative values and managed to make them touch at
> zero by putting them in two adjacent plot regions (mfrow) and making the
> margin at the touching sides zero in both plots.
>
> Regards, Lorenz

One might also play around with the space argument:

barplot(rbind(c(1:3,3:1,-3:-1,-1:-3),c(1:6,-6:-1)),
space=c(rep(0.5,6),-8.5,rep(0.5,5)),col=c('red','orange'))

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


This archive was generated by hypermail 1.02.