Add vertical separator and labels to R barplot
问题 I have the following data frame from which I make a bar plot. Then, I am trying to add Group separators with vertical lines and to place labels in between these lines by creating a new x-axis: Group = c("1_1", "1_2", "1_3", "2_1", "2_2", "3_1", "3_2", "3_3", "3_4") Value = as.numeric(c("-1.23", "2.34", "0.56", "1.87", "-2.40", "5.54", "-0.98", "-2.31", "6")) data = data.frame(Group, Value) data Group Value 1_1 -1.23 1_2 2.34 1_3 0.56 2_1 1.87 2_2 -2.40 3_1 5.54 3_2 -0.98 3_3 -2.31 3_4 6.0