2020年8月11日火曜日

scatterplot3d

 use same data.frame mdf as the previous entry.


library("scatterplot3d")

len <- dim(mdf)[1]

x3d <- c()

for(i in seq(1,47,1)){ x3d <- append(x3d,rep(i,len))}

z3d <- c()

for(i in seq(1,47,1)){ z3d <- append(z3d,mdf[,i])}

# scatterplot3d(x3d,rep(mdf$t,47),z3d,highlight.3d = TRUE, type = "h", pch = " ",zlim=c(0,500))

y3d <- as.integer(gsub('-','',as.character(mdf$t)))

# scatterplot3d(x3d,rep(y3d,47),z3d,highlight.3d = TRUE, type = "h", pch = " ",zlim=c(0,500))

color <- c(rep("black",12*len),rep("orange",len),rep("black",13*len),rep("yellow",len),rep("black",12*len),rep("green",len),rep("black",7*len))

# scatterplot3d(x3d,rep(y3d,47),z3d,highlight.3d = TRUE, type = "h", pch = " ",zlim=c(0,30),angle = 65)

scatterplot3d(x3d,rep(y3d,47),z3d,color, type = "h", pch = " ",zlim=c(0, max(mdf[,-48])),angle = 65,col.grid="grey")



color <- c(rep("grey",12*len),rep("orange",len),rep("grey",13*len),rep("yellow",len),rep("grey",12*len),rep("green",len),rep("grey",7*len))
par(bg = 'grey25', fg = 'white',col.axis = 'white',col.lab='white')
scatterplot3d(x3d,rep(y3d,47),z3d,color, type = "h", pch = " ",zlim=c(0, max(mdf[,-48])),angle = 65)


0 件のコメント: