Message-ID: <1292931615322-3145166.post@n4.nabble.com>
Date: 2010-12-21T11:40:15Z
From: Dieter Menne
Subject: labels and barchart
In-Reply-To: <AANLkTim1gdxKQmNr7nXV=mBV6eEosFfKTdrBd7natPx6@mail.gmail.com>
Robert Ruser wrote:
>
> x <- seq(20, 100, by=15)
> ety <- rep( "Effect on treatment group", times=length(x))
> barplot(x, names.arg=ety, las=1, horiz=TRUE)
>
> Labels are not visible. But trial and error method with the second mar
> argument I get what I want.
>
Standard graphics has fallen a bit out of favor because of these quirks. Try
lattice:
library(lattice)
x <- seq(20, 100, by=15)
ety <- paste("Effect on treatment group",1:length(x))
barchart(ety~x)
Note that the ety labels must be different to make this work. With your
original data, you only get one bar (and I needed some time to find out what
was wrong).
Dieter
--
View this message in context: http://r.789695.n4.nabble.com/labels-and-barchart-tp3141185p3145166.html
Sent from the R help mailing list archive at Nabble.com.