CSM Plot PCA


Plot the scores and loadings from a PCA model

Utilises the CJSpcaPlot function written by Caroline Sands.

If classes is specified, uses those classes. Otherwise uses the

classes specified in the csm_pca_model.input.spectra (csm_nmr_spectra).

Usage

figure = csm_plot_pca( csm_pca_model );

figure = csm_plot_pca( csm_pca_model, 'plot_type', plot_type, 'classes', classes, 'sample_ids', sample_ids, 'components', components );

Arguments (* = required)

VariableTypeDefault ValueDescription
*csm_pca_modelcsm_pcaNonecsm_pca model.
plot_typestr'all''all', 'scores', 'loadings', 'stats'
classesm*1is table from csm_pca spectra inputClasses for plotting
sample_idscellis sample_ids from csm_pca spectra inputSample Labels for plotting
componentsm*1is allVector of which components to plot

Returns

VariableTypeDescription
figurecsm_figurecsm_figure with some stored inputs, the handle and auditInfo.

Copyright Imperial College London 2019