Control Arrows

# Load pca
from pca import pca

# Initialize pca
model = pca(n_components=3)

# Load example data set
df = model.import_example(data='iris')

# Fit transform
results = model.fit_transform(df)
# Strenght of the loadings are shown in two colors (red=strong, blue=weak).
model.biplot(s=0)
_images/wine_arrow_1.png
# Change colors
model.biplot(s=0, arrowdict={'color_strong': 'r', 'color_weak': 'g'})
_images/wine_arrow_2.png
# The transparancy of the arrows are set on the loading value. You can also set it to a constant value.
model.biplot(s=0, arrowdict={'alpha': 0.8})
_images/wine_arrow_3.png
# Change text color
model.biplot(s=0, arrowdict={'color_text': 'k'})
_images/wine_arrow_4.png
# Change arrow color.
model.biplot(s=0, color_arrow='k')
_images/wine_arrow_5.png
# Set color arrow and color text
model.biplot(s=0, color_arrow='k', arrowdict={'color_text': 'g'})
_images/wine_arrow_8.png
# Default settings
model.biplot()
_images/wine_arrow_9.png
# Change the scale factor of the arrow. The scale_factor of 3 seems a little bit too much here ;)
model.biplot3d(arrowdict={'scale_factor': 3})
_images/wine_arrow_10.png