This question already has an answer here:
I want to create a horizontal histogram, and adjust the chart aspect ratio using ggplot2
.
For example let's say my chart is dia <- ggplot(diamonds, aes(x=color)) + geom_bar()
.
I can flip this to be horizontal using dia + coord_flip()
.
I can also adjust the aspect ratio e.g. dia + coord_fixed(ratio=.001)
.
But when I combine them dia + coord_flip()+ coord_fixed(ratio=.001)
, the chart is no longer horizontal.
Is there any way to achieve what I want using ggplot2
?
See this answer on the ggplot2 mailing list :