用r为集群输出着色
我有一组集群输出。我想在平行坐标图中用唯一的颜色显示每个簇。我正在使用rggobi绘制平行坐标图。我使用了这个链接 这是我将数据加载到ggobi的代码用r为集群输出着色,r,data-visualization,R,Data Visualization,我有一组集群输出。我想在平行坐标图中用唯一的颜色显示每个簇。我正在使用rggobi绘制平行坐标图。我使用了这个链接 这是我将数据加载到ggobi的代码 library(rggobi) mydata <- read.table("E:/Thesis/Experiments/R/input.cvs",header = TRUE,sep = ",") g <- ggobi(mydata) 库(rggobi) mydata也可以使用MASS:::parcoord() 或使用ggplot
library(rggobi)
mydata <- read.table("E:/Thesis/Experiments/R/input.cvs",header = TRUE,sep = ",")
g <- ggobi(mydata)
库(rggobi)
mydata也可以使用MASS:::parcoord()
或使用ggplot2:
require(ggplot2)
require(reshape2)
iris$ID <- 1:nrow(iris)
iris_m <- melt(iris, id.vars=c('Species', 'ID'))
ggplot(iris_m) +
geom_line(aes(x = variable, y = value, group = ID, color = Species))
require(ggplot2)
要求(2)
iris$ID也可以使用MASS:::parcoord()
或使用ggplot2:
require(ggplot2)
require(reshape2)
iris$ID <- 1:nrow(iris)
iris_m <- melt(iris, id.vars=c('Species', 'ID'))
ggplot(iris_m) +
geom_line(aes(x = variable, y = value, group = ID, color = Species))
require(ggplot2)
要求(2)
iris$ID请包含可复制代码!请包括可复制的代码!