pydiodon.plot_var

pydiodon.plot_var(V, varnames=None, axis_1=1, axis_2=2, title=None, x11=True, plotfile=None, fmt='png')[source]

Plots the correlations between the variables

Parameters
Va \(p \times p\) 2D numpy array

column k of V is the `k-`th principal axis

varnamesa list of strings
the names of the variables (the columns of A on which the PCA has been done)
default value is None (no names are displayed)
axis_1an integer
the first principal axis to be displayed
default value is 1
axis_2an integer
the second principal axis to be displayed
default value is 2
titlestring
title of the plot
default value is None (no title)
x11boolean
the plot is displayed on the screen if x11=True
default value is True
plotfilestring
name of the file to save the plot
defaulkt value is None (plot not saved)
fmtstring
format of the file to save the plot.
accepted values are png, eps, pdf.

Notes

returns a plot

Example

>>> import pydiodon as dio
>>> A, rn, cn = dio.load_dataset("diatoms_sweden")
>>> Y, L, V = dio.pca(A)
>>> dio.plot_var(V, varnames=cn)

af, 22.10.28