[R] Logrithmic histogram?
Hasan Diwan
hasan.diwan at gmail.com
Mon Jan 23 06:12:21 CET 2012
On 22 January 2012 19:29, Kevin Burton <rkevinburton at charter.net> wrote:
> I have some data where the frequency is heavily weighted on the lower end.
> So I have lots of low values with very few higher values. I would like to
> find breakpoints that cover the data with as much detail as possible. I find
> that if I use hist() to automatically find the breaks for me it finds breaks
> that are too coarse for the low values. I have tried the other algorithms
> (like 'Scott' and 'FD') but I have been unable to get it to work for me. I
> think I need breaks based on the inverse logarithm of the frequency so that
> the low values which have a high frequency are more or less evenly
> distributed about like the lower frequency high values. Is there a function
> to find the breaks like this?
Using ggplot2:
require(ggplot2)
data(diamonds)
qplot(carat, data = diamonds, geom = "histogram",log='xy')
--
Sent from my mobile device
Envoyait de mon portable
More information about the R-help
mailing list