2017-05-14 51 views
3

初めてplotlyパッケージを使用して3Dプロットを生成しています。チュートリアルに従っていますが、プロットポイントはRStudioビューアには表示されません。ただ空のグリッド。 enter image description hereRStudioビューアで正しく表示されない

library(plotly) 
packageVersion('plotly') 
#[1] ‘4.6.0’ 

mtcars$am[which(mtcars$am == 0)] <- 'Automatic' 
mtcars$am[which(mtcars$am == 1)] <- 'Manual' 
mtcars$am <- as.factor(mtcars$am) 

p <- plot_ly(mtcars, x = ~wt, y = ~hp, z = ~qsec, color = ~am, colors = c('#BF382A', '#0C4B8E')) %>% 
    add_markers() %>% 
    layout(scene = list(xaxis = list(title = 'Weight'), 
         yaxis = list(title = 'Gross horsepower'), 
         zaxis = list(title = '1/4 mile time'))) 

私は、Webブラウザでプロットを開いたときしかし、ポイントは罰金に表示されます。

私はここに同様の質問を参照してください。Plotly in RStudio viewer

しかし、ポイントは、まだ表示されませんRStudioの最新バージョンに更新した後に。私はRバージョンを使用しています3.3.3

答えて

2

plotlyの4.6.0リリースとRstudioの1.0.143リリースとの間に互換性がないようです。 plotlyのリリース4.5.6のリリースを使用してみてください:

devtools::install_version("plotly", version = "4.5.6", 
       repos = "http://cran.us.r-project.org") 

それがうまく動作し、プロット点は、今私のRStudioの最新リリースに表示されます。

+0

ありがとうございました :) –

関連する問題