I'm not understand what the unequal-bin-width histogram indicates, and
also I afraid that these kinds of plots confuse readers.
But as a counter part of built-in hist function, which accepts the
variable bin width,
you can do it by hand like this:
d <- rnorm(1000)
h <- hist(d, breaks = c(-5, -3, 1, 2, 3, 5), plot =F)
r <- data.frame(h[2:4], xmin = head(h$breaks, -1), xmax = h$breaks[-1])
ggplot(r, aes(xmin = xmin, xmax = xmax, ymin = 0, ymax = density)) +
geom_rect(colour="white")
--
Kohske Takahashi <takahash...@gmail.com>
Research Center for Advanced Science and Technology,
The University of Tokyo, Japan.
http://www.fennel.rcast.u-tokyo.ac.jp/profilee_ktakahashi.html
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>