I want to create a horizontal histogram and adjust the aspect ratio of the chart using ggplot2 .
For example, let's say my diagram is dia <- ggplot(diamonds, aes(x=color)) + geom_bar() .
I can flip it horizontally using dia + coord_flip() .
I can also adjust aspect ratio for example. dia + coord_fixed(ratio=.001) .
But when I combine them dia + coord_flip()+ coord_fixed(ratio=.001) , the diagram is no longer horizontal.
Is there a way to achieve what I want to use ggplot2 ?
source share