在示例 ggbiplot 脚本图中有 3 个组,如何更改标记颜色和形状?
library(ggbiplot)
data(wine)
wine.pca <- prcomp(wine, scale. = TRUE)
ggbiplot(wine.pca, obs.scale = 1, var.scale = 1, group=wine.class,
varname.size = 3, labels.size=3,
ellipse = TRUE, circle = TRUE) +
scale_color_discrete(name = '') +
geom_point(aes(colour=wine.class), size = 3) +
theme(legend.direction ='horizontal',
legend.position = 'top')