我正在尝试在每个小提琴图中创建带有箱线图的小提琴图。目前,箱线图是根据 x 变量创建的,同时结合填充分组。我希望每个 x 变量的每个填充组都有一个箱线图。
谢谢您的帮助!
ggplot(aes(y = HGT.Diff,
x = `Platform`,
fill = Metric,
color = Metric),
data = dta_compile) +
geom_violin(draw_quantiles = c(0.5)) +
geom_boxplot(width = 0.1, fill = "grey", color = "black") +
ylim(0,1) +
labs(title = "Comparing Ground Filters",
x = "Flight Date",
y = "Absolute Difference to Manual HGT Measurmenets (m)") +
theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust=.4)) +
facet_grid(`Flight.Date` ~ `GroundFilter`)