Rotate histogram in R or overlay a density in a barplot

后端 未结 5 841
一个人的身影
一个人的身影 2021-01-31 12:01

I would like to rotate a histogram in R, plotted by hist(). The question is not new, and in several forums I have found that it is not possible. However, all these answers date

5条回答
  •  死守一世寂寞
    2021-01-31 12:29

    When using ggplot, flipping axes works very well. See for example this example which shows how to do this for a boxplot, but it works equally well for a histogram I assume. In ggplot one can quite easily overlay different plot types, or geometries in ggplot2 jargon. So combining a density plot and a histogram should be easy.

提交回复
热议问题