2
軸3dの外箱を示しています。はplotly私はplotlyにAA 3D散布図を作成するために、次のコードを使用
library(plotly)
A <- c(50,20,0)
B <- c(50,0,30)
C <- c(50,0,0)
D <- c(50,20,30)
E <- c(0,0,30)
F <- c(0,20,0)
G <- c(0,0,0)
H <- c(0,20,30)
classes <- c("A","B","C","D",
"E","F","G","H")
conceptual <- rbind(data.frame(),A,B,C,D,
E,F,G,H)
colnames(conceptual) <- c("X","Y","Z")
conceptual$labels <- classes
scene = list(camera = list(eye = list(x = 2.5, y = -1.5, z = 1.25)))
p <- plot_ly(conceptual, x = ~X, y = ~Y, z = ~Z, text = ~labels) %>%
add_markers() %>%
add_text() %>%
layout(scene=scene,showlegend = FALSE)
p
そして、このプロットを得る: plot
を私の質問は、私は行を追加する方法、です軸上のボックスの外側が表示されますか?そのような何か: required plot
感謝。しかし、私はそれを行うことをプロットして特徴を探していました。あなたは1つを知っていますか? –
@idoklein申し訳ありませんが、わたしの解決策は 'plotly'コマンドのみを使用しており、あなたの質問に答えています。なぜそれはOKではないのですか?あなたのニーズは何ですか? –