Re: [R] Adding x-axis values to a histogram

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Tue, 11 Mar 2008 16:04:31 -0300

Try this:

hv <- hist(z, breaks = 30, xaxt='n')
axis(1, hv$breaks )

On 11/03/2008, diegol <diegol81_at_gmail.com> wrote:
>
> Dear useRs,
>
> Is there a way one can add x-axis values to a histogram? Example:
>
> z = rgamma(n=1000, shape = 8, scale = 1000)
> hist(z, breaks = 30)
>
> Currently I see 4 x-axis values: 5000, 10000, 15000, 20000. Can I add more
> values or modify the ones currently showing? I tried ?hist, yet couldn't
> work this out.
>
> Thank you very much.
>
> -----
> ~~~~~~~~~~~~~~~~~~~~~~~~~~
> Diego Mazzeo
> Actuarial Science Student
> Facultad de Ciencias Económicas
> Universidad de Buenos Aires
> Buenos Aires, Argentina
> --
> View this message in context: http://www.nabble.com/Adding-x-axis-values-to-a-histogram-tp15983513p15983513.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help_at_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.
>

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

______________________________________________
R-help_at_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.
Received on Tue 11 Mar 2008 - 19:13:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 11 Mar 2008 - 20:30:21 GMT.

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

list of date sections of archive