[R] labels and barchart

Dieter Menne dieter.menne at menne-biomed.de
Tue Dec 21 12:40:15 CET 2010

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

x <- seq(20, 100, by=15)
ety <- paste("Effect on treatment group",1:length(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).


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.

More information about the R-help mailing list