Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
用r为集群输出着色_R_Data Visualization - Fatal编程技术网

用r为集群输出着色

用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

我有一组集群输出。我想在平行坐标图中用唯一的颜色显示每个簇。我正在使用rggobi绘制平行坐标图。我使用了这个链接

这是我将数据加载到ggobi的代码

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请包含可复制代码!请包括可复制的代码!