有人知道如何更改点大小并仍然保持下面代码中的组颜色吗?
只需添加将geom_point(size = 8)
所有点的颜色更改为黑色。
代码:
library(ggbiplot)
data(wine)
wine.pca <- prcomp(wine, scale. = TRUE)
g <- ggbiplot(wine.pca, obs.scale = 1, var.scale = 1,
groups = wine.class, varname.size = 8, labels.size=10 , ellipse = TRUE, circle = TRUE)
g <- g + scale_color_discrete(name = '') #+ geom_point(size = 8)
g <- g + opts(legend.direction = 'horizontal',
legend.position = 'top')
print(g)