Graphics Programs Reference
In-Depth Information
0.6
qtz
0.4
amp
cla
0.2
pla
ksp
pyr
0
−0.2
sph
−0.4
flu
gal
−0.6
−0.8
−0.4
−0.2
0
0.2
0.4
0.6
0.8
−0.6
First principal component scores
Fig. 9.3 Principal components scores suggesting that the PCs are infl uenced by different
minerals. See text for detailed interpretation of the PCs.
containing the principal component scores.
plot(newdata(:,1),newdata(:,2),'+')
text(newdata(:,1)+0.01,newdata(:,2),sample), hold
x=get(gca,'XLim'); y=get(gca,'YLim');
plot(x,zeros(size(x)),'r')
plot(zeros(size(y)),y,'r')
xlabel('First Principal Component Scores')
ylabel('Second Principal Component Scores')
This plot clearly defi nes groups of samples with similar infl uences. The
samples 1, 2, 8 to 10 dominated by magmatic infl uences cluster in the left
half of the diagram, the samples 3 to 5 dominated by the hydrothermal vein
group in the lower part of the right half, whereas the two sandstone domi-
nated samples 6 and 7 fall in the upper right corner.
Next we use the third output of the function princomp to compute the
variances of the corresponding PCs.
percent_explained=100*variances/sum(variances)
Search WWH ::




Custom Search