Re: [R] Order Bars in ggplot2 bar graph

2015-03-19 Thread Thierry Onkelinx
You need to set the levels of the factor in the required order. data$Leaf <- factor(data$Leaf, levels = c("C_Cot", "C_2", "C_1")) ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assu

[R] Order Bars in ggplot2 bar graph

2015-03-19 Thread michael.eisenring
Dear experts, I am trying to make a bar graph using ggplot2. I would like to define the order of my bars independently of alphabetical or numerical order. How can I do that. Here a simplified example of my code and comments(#) describing my problem: #Code start library(ggplot2) bar<-ggplot(da