[R] barplot with anchored bars

Paulo Barata pbarata at infolink.com.br
Thu Aug 21 20:47:35 CEST 2008

Dear R list members,

How to produce barplots anchored to the x-axis (not floating
above the x-axis) with a box around?

With both following codes, the lower horizontal line of the
box is below the y = 0 line:

# first code
x <- c(1,2,3,4)

# second code
x <- c(1,2,3,4)
op <- par(yaxs='i')

The parameter yaxs='i' does not seem to work with barplot.

I use R version 2.7.1, running on Windows XP.

Thank you very much.

Paulo Barata

Paulo Barata
Fundacao Oswaldo Cruz - Oswaldo Cruz Foundation
Rua Leopoldo Bulhoes 1480 - 8A
21041-210  Rio de Janeiro - RJ

E-mail: pbarata at infolink.com.br
Alternative e-mail: paulo.barata at ensp.fiocruz.br

More information about the R-help mailing list