What approach do you use for 3d plotting in Rmd (notebooks and documents)



Sometimes, 3d plots help. They can be complex/risk obscuring information, but still valuable when trying to understand information across multiple dimensions.

What techniques/ tools to you use to approach embedding these visualisations in R markdown outputs? I've played with plotly, though I'm unsatisfied with the programmatic interface (just personal opinion, I dislike the idioms), and also with rgl, though I've been having trouble getting it to render in outputs (despite playing with knit_hooks$set(webgl = hook_webgl), etc).

Are there any other solutions that people recommend?


I've had some success with Plotly, but only tried it once. Results were visually pleasing, and the saved HTML worked flawlessly in the browsers I tried. Like you, I wasn't too excited about the programmatic interface, and the documentation was not always as helpful as I had hoped.


Another option is rthreejs. I haven't tried it but the examples look very nice.