[R] disappointed with x-axes in hist and density plots

Thomas Lumley tlumley at u.washington.edu
Thu Jun 17 18:53:33 CEST 2004


On Thu, 17 Jun 2004, Rishi Ganti wrote:

> I've got a few issues with the x-axes in the histogram and density plots.  First,
> often the default x-axis doesn't even extend to the length of my data. R often draws
> histogram bars  (or density lines) farther than the drawn x-axis extends. For example,
> I might have a histogram bar at -15,000. But I wouldn't know that, because the most
> negative number on the x-axis is -10,000.  The second issue is the use of scientific
> notation. Yes I can read it, but I don't prefer it. Is there any way for R just
> to print out 1000000 and not 1e+6 on these charts?  Thanks for your help.  Rishi
>

You can use the axis() function to draw axes with any set of labels you
want.

	-thomas




More information about the R-help mailing list