Skip to Content
R Programming By Example
book

R Programming By Example

by Omar Trejo Navarro
December 2017
Beginner to intermediate
470 pages
12h 29m
English
Packt Publishing
Content preview from R Programming By Example

Exploring with interactive 3D scatter plots

When exploring data, sometimes it's useful to look at a 3D scatter plot. However, if the scatter plot is fixed (meaning that you cannot move it around), it may not be easy to interpret. Having an interactive plot (one you can move around) to see different angles of the data is very useful in these cases. These graphs don't normally go into static reports because they are hard to interpret correctly when fixed, but are very useful to do data exploration. Luckily, they are also very easy to create with the plot3d() function from the rgl package:

library(rgl)
plot3d(sales$PROTEIN, sales$CARBS, sales$FAT)
plot3d(sales$PROFIT_RATIO, sales$PRICE, sales$QUANTITY)

Once you create these plots in your computer, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Efficient R Programming

Efficient R Programming

Colin Gillespie, Robin Lovelace
R Programming

R Programming

Jared P. Lander

Publisher Resources

ISBN: 9781788292542Supplemental Content