在 R 中使用 factoextra 更改补充列的颜色
Change colour of supplementary column using factoextra in R
我正在尝试使用包 factoextra 中的 fviz_ca_col()
更改对应分析中用于补充列的颜色,但我似乎没有得到任何颜色从默认 col.col.sup = "darkred"
更改颜色时的响应。可重现的例子:
library(FactoMineR)
library(factoextra)
# Load example data
data("housetasks")
# Perform correspondence analysis
resca <- CA(housetasks,
col.sup = which(names(housetasks) == "Alternating"),
graph = FALSE)
# Call to plot
fviz_ca_col(resca, col.col.sup = "black")
生成的图具有默认深红色的补充列 "Alternating"
:
source code 中存在错误:
fviz (X, element = "col", axes = axes, geom = geom.col,
color = col.col, alpha = alpha.col,
pointshape = shape.col, select = select.col,
map = map, repel = repel,
colcol.sup = col.col.sup, shape.sup = shape.col, ...)
输入参数应该是col.col.sup =
而不是colcol.sup =
一种方法是调用 fviz:
fviz(resca,element="col",col.col.sup="black")
我正在尝试使用包 factoextra 中的 fviz_ca_col()
更改对应分析中用于补充列的颜色,但我似乎没有得到任何颜色从默认 col.col.sup = "darkred"
更改颜色时的响应。可重现的例子:
library(FactoMineR)
library(factoextra)
# Load example data
data("housetasks")
# Perform correspondence analysis
resca <- CA(housetasks,
col.sup = which(names(housetasks) == "Alternating"),
graph = FALSE)
# Call to plot
fviz_ca_col(resca, col.col.sup = "black")
生成的图具有默认深红色的补充列 "Alternating"
:
source code 中存在错误:
fviz (X, element = "col", axes = axes, geom = geom.col,
color = col.col, alpha = alpha.col,
pointshape = shape.col, select = select.col,
map = map, repel = repel,
colcol.sup = col.col.sup, shape.sup = shape.col, ...)
输入参数应该是col.col.sup =
而不是colcol.sup =
一种方法是调用 fviz:
fviz(resca,element="col",col.col.sup="black")