0

I am plotting distances between and within groups. I am sub-setting the data and want to maintain the order in the boxplot.

ggplot(subset(total, groups %in% c("A-A","C-B", "C-C", "B-B", "D-A", "All")), aes(x=groups, y=distance, fill=groups)) + geom_boxplot()

I need the order of the subset to maintain in the plot. I tried setting levels within subset but doesn't work that way. Suggestions?

akang
  • 566
  • 2
  • 15

0 Answers0