Skip to content
Prev 370104 / 398503 Next

ggplot2 geom_bar arrangement

The order the bars are plotted in is determined by the levels in a factor, and your labels are treated as a factor. You can make sure you keep the order of your labels by simply doing this:

Lab <- factor(Lab, levels = Lab)

before constructing the data frame.

Cheers
On 27 Jun 2017, 20.43 +0200, Brian Smith <bsmith030465 at gmail.com>, wrote: