How to manually increase spacing between two specific boxes within a grouped box plot in R?
问题 Is there a way to increase the spacing between the yellow and red boxes within this box plot? set.seed(40) df <- data.frame( Outcome = runif(60), Fruit = rep(1:3, each = 10), Freshness = rep(c(0, 0.5), each = 30), Farm = factor(rep(c("A", "B"), each = 5)) ) %>% transform( Outcome = Outcome*Fruit+Freshness, Fruit = as.factor(Fruit), Freshness = as.factor(Freshness) ) ggplot(data = df, aes(Farm, Outcome, col = Freshness, fill = Fruit)) + geom_boxplot() + scale_color_manual(values = c(