0

I'm new to R and I have a question regarding the package factoextra and the function fviz_nbclust().

I want to rename myself the axis X and Y but i can't find how to do it. I found how to add the title but not the axis.

fviz_nbclust(new_data, kmeans, method = "wss") +
geom_vline(xintercept = 4 , linetype = 2)+
labs(title= "K-means")

Does anyone know how to rename the axis ?

Thank you for your time.

4

1 回答 1

0

如果没有最小的工作示例,我无法确定,但类似

fviz_nbclust(new_data, kmeans, method = "wss") +
geom_vline(xintercept = 4 , linetype = 2)+
labs(title= "K-means") + 
xlab("New x label") +
ylab("New y label")

有关更多信息,请参阅 ggplot 文档http://docs.ggplot2.org/0.9.2.1/labs.html

如果您是 stackoverflow 的新手,请记住在提出问题时提供最少的工作,并选择正确答案并投票赞成。

于 2016-11-25T17:38:27.017 回答