Rcmdr package : Creating 3D plot of sample dataset using R commander GUI in R
- Open R.
- write the following command on R console (omit '>')
- select a download mirror and the Rcmdr package will be installed to the system.
- Load the package using
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
Post a Comment