diff --git a/r/2015-07-30-3d-scatter-plots.Rmd b/r/2015-07-30-3d-scatter-plots.Rmd index f1178127..bec3d1b9 100644 --- a/r/2015-07-30-3d-scatter-plots.Rmd +++ b/r/2015-07-30-3d-scatter-plots.Rmd @@ -40,7 +40,8 @@ fig library(plotly) fig <- plot_ly(mtcars, x = ~wt, y = ~hp, z = ~qsec, - marker = list(color = ~mpg, colorscale = c('#FFE1A1', '#683531'), showscale = TRUE)) + color = ~mpg, + colors = c('#FFE1A1', '#683531')) fig <- fig %>% add_markers() fig <- fig %>% layout(scene = list(xaxis = list(title = 'Weight'), yaxis = list(title = 'Gross horsepower'), @@ -52,7 +53,7 @@ fig <- fig %>% layout(scene = list(xaxis = list(title = 'Weight'), xref = 'paper', yref = 'paper', showarrow = FALSE - )) + )) fig ``` @@ -100,4 +101,4 @@ fig #Reference -See [https://plotly.com/r/reference/#scatter3d](https://plotly.com/r/reference/#scatter3d) for more information and chart attribute options! \ No newline at end of file +See [https://plotly.com/r/reference/#scatter3d](https://plotly.com/r/reference/#scatter3d) for more information and chart attribute options!