Documentation |
Biplot
biplot(coefs)
h = biplot(coefs,'Name',Value)
biplot(coefs) creates a biplot of the coefficients in the matrix coefs. The biplot is 2-D if coefs has two columns or 3-D if it has three columns. coefs usually contains principal component coefficients created with pca, pcacov, or factor loadings estimated with factoran. The axes in the biplot represent the principal components or latent factors (columns of coefs), and the observed variables (rows of coefs) are represented as vectors.
A biplot allows you to visualize the magnitude and sign of each variable's contribution to the first two or three principal components, and how each observation is represented in terms of those components.
biplot imposes a sign convention, forcing the element with largest magnitude in each column of coefs to be positive. This flips some of the vectors in coefs to the opposite direction, but often makes the plot easier to read. Interpretation of the plot is unaffected, because changing the sign of a coefficient vector does not change its meaning.
biplot scales the scores so that they fit on the plot: It divides each score by the maximum absolute value of all scores, and multiplies by the maximum coefficient length of coefs. Then biplot changes the sign of score coordinates according to the sign convention for the coefs.
h = biplot(coefs,'Name',Value) specifies one or more name/value input pairs and returns a column vector of handles to the graphics objects created by biplot. The h contains, in order, handles corresponding to variables (line handles, followed by marker handles, followed by text handles), to observations (if present, marker handles followed by text handles), and to the axis lines.
'Scores' |
Plots both coefs and the scores in the matrix scores in the biplot. scores usually contains principal component scores created with pca or factor scores estimated with factoran. Each observation (row of scores) is represented as a point in the biplot. |
'VarLabels' |
Labels each vector (variable) with the text in the character array or cell array varlabels. |
'ObsLabels' |
Uses the text in the character array or cell array obslabels as observation names when displaying data cursors. |
'Positive' |
Default: false |
'PropertyName' |
Specifies optional property name/value pairs for all Primitive Line Properties graphics objects created by biplot. |
factoran | nnmf | pca | pcacov | rotatefactors