Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206235

How do I rotate a plot clockwise with ggplot? [duplicate]

$
0
0

This question already has an answer here:

I'm trying to visualize the different backgrunds of our students, the bars represent different high school programs. I write:

ggplot(test, aes(x=fct_infreq(gymnasiegrov))) + geom_bar()

And I get:

enter image description here

As you can see the names get very cluttered, so I write:

ggplot(test, aes(x=fct_infreq(gymnasiegrov))) + geom_bar()+coord_flip()

And get:

enter image description here

This "does" look much better, but for optimal effect I would like to show the frequencies in descending order from the top, like my first plot but rotated clockwise.

Is there any way I can make this happen?


Viewing all articles
Browse latest Browse all 206235

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>