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
- 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 displayeddefault value is 1
- axis_2an integer
- the second principal axis to be displayeddefault value is 2
- titlestring
- title of the plotdefault value is None (no title)
- x11boolean
- the plot is displayed on the screen if x11=Truedefault value is True
- plotfilestring
- name of the file to save the plotdefaulkt 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