Generate a biplot for the Iris dataset.
>
|
|
>
|
|
A Biplot can also be used to show the first two components and the observations on the same diagram. The first principal component is plotted on the x-axis and the second on the y-axis.
>
|
|
From the biplot, it can be observed that petal width and length are highly correlated and their variability can be primarily attributed to the first component. Likewise, the first component also explains a large part of the Sepal length. The variability in sepal width is more attributed to the second component.
It is also possible to generate a biplot displaying other principal components using the components option. For example, here is a plot of the third and fourth principal components:
>
|
|
It is possible to view the first three components using the dimension option. Also, the colorscheme option applies different colors based on the various levels in the "Species" column.
>
|
|
The canada_crimes.csv dataset contains information on types of crimes committed per 100000 people:
>
|
|
The pointlabels option controls if the points in the biplot include labels or not. Additional options such as axes or size are passed to the plots:-display command.
>
|
|