Skip to main content

Plotting 3D Scatterplot using Rcmdr GUI package in R

Rcmdr package : Creating 3D plot of sample dataset using R commander GUI in R

  • Open R.
  • write the following command on R console (omit  '>')
> install.packages("Rcmdr")
  • select a download mirror and the Rcmdr package will be installed to the system.
  • Load the package using 
> library(Rcmdr)
The R commander GUI will look like this:


  • In the menu, go to Data -> Data in packages  -> Read data set from an attached package
  • now select datasets from left pane and then select iris dataset from right pane by double clicking on it and click OK
  • In the R commander menu ,go to Graphs -> 3D graphs -> 3D scatterplot
  • Now a new window of 3D scatterplot will open :


  • Now select one response variable from right pane and one Explanatory variable from left pane.I select Petal.Length from right and Petal.Width, Sepal.Length from left. Go to options menu and choose background color as black. Also, click on 'Plot by groups' button and check on 'Parallel Regression Surfaces'. 
  • Click Ok. And Tada...its done.

From this 3D graph you can interpret the dataset more clearly by moving it 360'

Comments

Popular posts from this blog

Installing R and RStudio GUI

R is a free software environment for statistical computing and graphics. The latest version of R i.e. R-3.0.2 has been released in sep 2013. R can be downloaded from the R project website      Click on download R. Choose a CRAN mirror(0-cloud Recommended). Select your Operating system. Install the base package.Install the latest version R-3.0.2 Also download Rtools and install after the R downlaod is finished. Downloading RStudio GUI       Click on download now button. Download RStudio desktop v0.97. Install it.