Open
Description
There is something wrong in the code concerning legends for groups when you try to use scale_color_discrete()
to set a property.
This has to do with the use of color
and fill
in geom_polygon()
.
The following example produces two legends:
data(wine)
wine.pca <- prcomp(wine, scale. = TRUE)
ggbiplot(wine.pca, obs.scale = 1, var.scale = 1,
groups = wine.class, ellipse = TRUE, circle = TRUE) +
scale_color_discrete(name = '') +
theme(legend.direction = 'horizontal', legend.position = 'top')
See the result at:
https://github.com/friendly/ggbiplot/blob/master/man/figures/README-wine-biplot-1.png
Metadata
Metadata
Assignees
Labels
No labels