pydiodon.plot_components_quality¶
- pydiodon.plot_components_quality(Y, Qual, axis_1=1, axis_2=2, r=2, cmap='ocean', diam=50, title=None, x11=True, plotfile=None, fmt='png')[source]¶
Scatter plot of the principal components with each dot colored according to the cumulated quality of the item for a given axis
- Parameters
- Ya 2D numpy array
matrix of principal components
- Quala 2D numpy array
- matrix of cumulated quality per item over all principal axiscomputed by diodon.plot_cumulated_quality_per_item(Y, …)
- axis_1an integer
- x axis of the plotdefault value is 1
- axis_2an integer
- y axis of the plotdefault value is 2
- ran integer
- the number of first axis over which to compute the cumulated quality per itemdefault value is r=2
- cmapa string
- the colormap selected for visualizing the quality by a colordefault value is “ocean”
- diaman integer
- dot size of each itemdefault value is 50
- titlea string
- title for the plotdefault value is None (no title)
- x11a boolean
- whether to display the plot on the screendefault value is True
- plotfilea string
- name of the file where to save the plotdefault value is None (plot not saved)
- fmta string
- format for the file where to save the plotpossible values are png, eps, pdfdefault value is png
Notes
Example
>>> import pydiodon as dio >>> A, rn, cn = dio.load_dataset("diatoms_sweden") >>> Y, L, V = dio.pca(A) >>> Qual = dio.plot_cumulated_quality_per_item(Y) >>> dio.plot_components_quality(Y, Qual)
af, revised 23.01.18