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)
barplot(x,yaxs='i')
box()

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

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
Brazil

E-mail: [EMAIL PROTECTED]
Alternative e-mail: [EMAIL PROTECTED]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to