pydiodon.plot_var_heatmap¶
- pydiodon.plot_var_heatmap(V, varnames=None, cmap='ocean', title=None, x11=True, plotfile=None, fmt='png')[source]¶
Plots a heatmap of the coordinates of the principal axis
- Parameters
- Va \(p \times p\) 2D numpy array
the coordinates of the principal axis in the basis of the variables
- varnamesa list of strings
- the names of the variables(names of the columns of A on which PCA has been done)
- cmapa string
- the matplotlib colormap for drawing the heatmapdefault value is viridis
- titlestring
title of the plot
- x11boolean
the plot is displayed on the scvreen if x11=True
- plotfilestring
name of the file to save the plot
the plot is not saved if plotfile=None
- fmtstring
format of the file to save the plot.
accepted values are png, eps, pdf.
- Returns
- a heatmap
Notes
Example
>>> import pydiodon as dio >>> A, rn, cn = dio.load_dataset("diatoms_sweden") >>> Y, L, V = dio.pca(A) >>> dio.plot_var_heatmap(V, varnames=cn)
af, 22.10.28, revised 23.01.19