✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

No markers on 3d plots

In 3D scatterplots, no markers are shown:
set.seed(2016-07-21)
temp <- rnorm(100, mean = 30, sd = 5)
pressure <- rnorm(100)
dtime <- 1:100
plot_ly(x = ~temp, y = ~pressure, z = ~dtime, type = “scatter3d”, mode=“lines”, color = ~temp)

The R code above displays the axes and legend, but no markers.
I’m using R 3.3.3, RStudio 1.0.143 and Plotly 4.6.0, on WIndows 10.

What am I doing incorrectly??? 2D scatterplots work correctly.

The “official” example from https://plot.ly/r/3d-scatter-plots/ also doesn’t display any markers

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’)))
p
EDIT: I’ve confirmed that if you save the plot from R studio (as a web page), then on Windows at least, Firefox, Edge and Chrome will display the markers correctly. I thought R-studio was based on Chrome/Chromium, so this is a puzzle.

same here: latest RStudio & plotly

OpenSUSE 42.2 & XFCE
OpenGL 3.1

I get this error in the CLI:
“TypeError: undefined is not a constructor (evaluating ‘ArrayBuffer.isView(t)’)”

same issue here, after updating from 4.5.6 to 4.6. I tried both the plotly 4.6 from CRAN, and also the developer version 4.6.0.9000, type=“scatter3d” in plot_ly() is not working. using rstudio 1.0.143
below is my system information:

Sys.info()
sysname release version nodename machine login user
"Windows" “>= 8 x64” “build 9200” “PWRPC1” “x86-64” “admin” "admin"
effective_user
"admin"
version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 4.0
year 2017
month 04
day 21
svn rev 72570
language R
version.string R version 3.4.0 (2017-04-21)
nickname You Stupid Darkness

Please help. Thanks

I’m pretty sure this issue is specific to RStudio on Windows. It should render when opening the plot in a WebGL enabled web browser.

It really ought to be rendering in RStudio though. What do you see when you do:

p <- plot_ly(x = 1:10, y = 10:1, z = 1:10)
p$dependencies

For me, the following appears:
> p <- plot_ly(x = 1:10, y = 10:1, z = 1:10)
> p$dependencies
[[1]]
List of 10
$ name : chr “jquery”
$ version : chr “1.11.3”
$ src :List of 1
…$ file: chr “c:/Work/Rlibs/crosstalk/lib/jquery”
$ meta : NULL
$ script : chr “jquery.min.js”
$ stylesheet: NULL
$ head : NULL
$ attachment: NULL
$ package : NULL
$ all_files : logi TRUE
- attr(*, “class”)= chr “html_dependency”

[[2]]
List of 10
 $ name      : chr "crosstalk"
 $ version   : chr "1.0.0"
 $ src       :List of 1
  ..$ file: chr "c:/Work/Rlibs/crosstalk/www"
 $ meta      : NULL
 $ script    : chr "js/crosstalk.min.js"
 $ stylesheet: chr "css/crosstalk.css"
 $ head      : NULL
 $ attachment: NULL
 $ package   : NULL
 $ all_files : logi TRUE
 - attr(*, "class")= chr "html_dependency"

[[3]]
List of 10
 $ name      : chr "typedarray"
 $ version   : chr "0.1"
 $ src       :List of 1
  ..$ file: chr "c:/Work/Rlibs/plotly/htmlwidgets/lib/typedarray"
 $ meta      : NULL
 $ script    : chr "typedarray.min.js"
 $ stylesheet: NULL
 $ head      : NULL
 $ attachment: NULL
 $ package   : NULL
 $ all_files : logi TRUE
 - attr(*, "class")= chr "html_dependency"

Thanks. Should be fixed in dev version. CRAN release coming in next few days.

1 Like

Has this issue been resolved?

I am using latest R and RStudio and plotly version 4.7 and still not getting any markers using the plotly official example or yours above: p <- plot_ly(x = 1:10, y = 10:1, z = 1:10).

I’m using R Shiny so I’ve tried the plot in Shiny and just in R Studio and no luck.

I am having the same problem on Windows 10 with R Studio.

I updated all of my packages yesterday and still not seeing markers on the 3d plots.

When will this be resolved?

Thanks

follow issue here https://github.com/ropensci/plotly/issues/1055