2020年8月16日日曜日

plot3d color col=

 


Don't forget "col="  in the parameters. it's not scatterplot3d!!


library(rgl)

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,dmdf[,i])}

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

# aichi 23, osaka 27, fukuoka 40, tokyo 13.

# color <- c(rep("grey",12*len),rep("orange",len),rep("grey",9*len),rep("pink",len),rep("grey",3*len),rep("yellow",len),rep("grey",12*len),rep("green",len),rep("grey",6*len),rep("red",len))

par(bg = 'grey25', fg = 'white',col.axis = 'white',col.lab='white')

y3d <- seq(1,len,1)

# plot3d(x3d,rep(y3d,47),z3d,col = color, type = "h", pch = " ",zlim=c(0, max(dmdf[,-48])))

plot3d(x3d,rep(y3d,47),z3d,col = as.vector(matrix(rep(rainbow(47),len),ncol=47,byrow=t)), type = "h", pch = " ",zlim=c(0, max(dmdf[,-48])))




==


0 件のコメント: