26INTERACTIVE 3D PLOTS
When it comes to 3D plots, it’s important to be able to view them from different angles to interpret the function or surface that’s been displayed. The rgl package by Adler et al. (2015) offers some fantastic, simple-to-use R functions that allow you to rotate and zoom in on three-dimensional plots with your mouse. In this chapter, you’ll look at a few examples that show off the possibilities of rgl.
Under the hood, rgl utilizes OpenGL—a standard application programming interface—to render the graphics on your computer screen. Install rgl (for example, by calling install.packages("rgl") at the prompt) and then call library("rgl") ...
Get The Book of R now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.