对于一系列多面分位数图,试图通过分组变量对各个点进行颜色编码(或按形状区分),而无需使分组继续沿x轴定位。一个使用mtcars数据集的简单示例:
library(tidyverse)
# the shape of the distribution I'm seeking
ggplot(mtcars, aes(sample = mpg)) + stat_qq()
# desired color-coding, but applied to original ungrouped sample
ggplot(mtcars, aes(sample = mpg, colour = factor(cyl))) + stat_qq()
犹豫不决,因为我肯定显然缺少明显的东西……但是搜索并没有给出答案,我很沮丧。