Site icon R-bloggers

How to Make 3D Plots in R

[This article was first published on business-science.io, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

This article is part of a R-Tips Weekly, a weekly video tutorial that shows you step-by-step how to do common R coding tasks.


The RStudio IDE is amazing. You can enhance your R productivity even more with these simple keyboard shortcuts.

Here are the links to get set up. ????


Making Your First 3D Plot
rayshader mtcars-style

Start by making a ggplot w/ mtcars displ vs mpg






Then unleash the AWESOME POWER ???? of rayshader to make it 3D ⛰️





Making Elevation Plots
rayshader heatmap-style

What about heatmaps and volcano plots?

Sometimes you have heatmap formatted data where you have a matrix:


We can handle this matrix data format with:

Full code in the video Github Repository


And BOOM! We have a 3D Elevation Heat-Map Plot! ⛰️⛰️⛰️

Full code in the video Github Repository


Your boss is loving your new data story-telling skills. ???? This is career acceleration


SETUP R-TIPS WEEKLY PROJECT

  1. Sign Up to Get the R-Tips Weekly (you’ll get email notifications of NEW R-Tips as they are released)
  2. Set Up the GitHub Repo
  3. Check out the setup video. Or, hit Pull in the Git Menu to get the R-Tips Code

Once you take these actions, you’ll be set up to receive R-Tips with Code every week. =)



???? Top R-Tips Tutorials you might like:


To leave a comment for the author, please follow the link and comment on their blog: business-science.io.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.