Re: [R] Switching X-axis and Y-axis for histogram

From: hadley wickham <h.wickham_at_gmail.com>
Date: Fri, 22 Jun 2007 21:13:09 +0200

It's trivial to do this with ggplot2 (http://had.co.nz):

qplot(rating, data=movies, geom="histogram") + coord_flip() qplot(rating, data=movies, geom="histogram", binwidth=0.1) + coord_flip()

Hadley

On 6/22/07, Donghui Feng <donghui.feng_at_gmail.com> wrote:
> Dear all,
>
> I'm creating a histogram with the function hist(). But
> right now what I get is column representation (as normal).
> I'm wondering if I could switch X-axis and Y-axis and
> get row-representation of frequencies?
>
> One more question, can I define the step of each axises
> for the histogram?
>
> Thanks so much!
>
> Donghui
>
> ______________________________________________
> R-help_at_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.
>



R-help_at_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 Fri 22 Jun 2007 - 19:18:09 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 Fri 22 Jun 2007 - 19:32:14 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.