gauravhalbe
gauravhalbe

Reputation: 402

Switching axis in R histogram

How should I switch X and Y axis in histograms?:

hist(Minimum)

Also, I wanted to have the X-axis range from 0 to 30. I am very new to R programming, any help here would be much appreciated.

Upvotes: 0

Views: 5437

Answers (1)

topchef
topchef

Reputation: 19793

Use function coord_flip added to your ggplot histogram:

plot = ggplot(...) + ...

plot + coord_flip()

Upvotes: 3

Related Questions