[R] parameter yaxs / function hist (graphics)

From: Paulo Barata <pbarata_at_infolink.com.br>
Date: Tue 08 Aug 2006 - 11:46:18 EST

Dear R users,

The parameters xaxs and yaxs (function par, package graphics) seem not to work with the function hist (package graphics), even when the parameters xlim and ylim are defined.

Is there any way to make yaxs="i" and xaxs="i" work properly with the function hist, mainly to produce histograms that "touch" the horizontal axis? The R documentation and the R mailing lists archive don't seem to be of help here.

I am using R 2.3.1, running under Windows XP.

## Example:
x <- rnorm(100)
hist(x,breaks=seq(-4,4,0.5),ylim=c(0,40),yaxs="i",

   xlim=c(-4,4),xaxs="i")
box()

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
Brasil
E-mail: pbarata@infolink.com.br


R-help@stat.math.ethz.ch 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. Received on Tue Aug 08 11:50:23 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 08 Aug 2006 - 14:21:26 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.