0

I drew a 3D plot with plot3d function using rgl packagein R

plot3d(x[,1:3], type= 's', col = y[,6], size= 2)

however I cant save it as html I tried knitr and writeWebGl , but without any success.

knit_hooks$set(rgl = hook_rgl)

also this code only open an empty html

browseURL(paste("file://", writeWebGL(dir=file.path(tempdir(), "webGL"), 
      width=500), sep=""))

my question is how i can save my 3d plot in html?

Zahra_fa
  • 11
  • 1
  • 1
    Did you follow https://stackoverflow.com/questions/30904198/how-to-export-an-interactive-rgl-3d-plot-to-share-or-publish ? – yeahman269 Jul 20 '21 at 16:19
  • Thank you @yeahman269 yes i followed, this code 'knit_hooks$set(webgl = hook_webgl)' run without error but showes nothing. and this one 'browseURL(paste("file://", writeWebGL(dir=file.path(tempdir(), "webGL"), width=500), sep=""))' opens a browser says "You must enable Javascript to view this page properly" however it is enable. so i couldnt solve the issue yet. – Zahra_fa Jul 21 '21 at 09:49

0 Answers0