when mdf is like below
head(mdf,2)
Hokkaido Aomori Iwate Miyagi Akita Yamagata Fukushima Ibaraki Tochigi Gunma Saitama Chiba Tokyo Kanagawa Niigata Toyama
1 10 0 0 0 0 0 0 0 0 0 6 2 2 0 3 0
2 8 0 0 0 0 0 0 0 0 2 3 2 2 3 0 0
Ishikawa Fukui Yamanashi Nagano Gifu Shizuoka Aichi Mie Shiga Kyoto Osaka Hyogo Nara Wakayama Tottori Shimane Okayama
1 0 0 0 0 0 1 7 5 0 2 9 8 0 0 0 0 0
2 0 0 0 0 0 0 3 0 0 0 3 13 0 0 0 0 0
Hiroshima Yamaguchi Tokushima Kagawa Ehime Kochi Fukuoka Saga Nagasaki Kumamoto Oita Miyazaki Kagoshima Okinawa
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 1 0 0 0 0 0 0
t
1 2020-03-12
2 2020-03-13
do as below
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))
scatterplot3d(x3d,rep(y3d,47),z3d,highlight.3d = TRUE, type = "h", pch = " ",zlim=c(0,500),angle = 65)
0 件のコメント:
コメントを投稿