I am trying to visualize my PCA analysis using ggplot but the output plot only shows 16 out of my 24 samples.
The data frame I created with my PCA data has 24 observations of 24 variables (24 samples, 24 PCAs), but ggplot is only plotting 16 out of the 24. Here is my code and mock data frame.
ggplot(data) +
aes(x=PC1, y=PC2) +
geom_point(size=3) +
coord_fixed() +
theme_bw()
Data frame
PC1 PC2
<dbl> <dbl>
1 -40.8 -20.6
2 -40.6 -19.0
3 -40.8 -20.6
4 8.01 -38.1
5 8.52 -36.3
6 8.01 -38.1
7 -39.7 -6.11
8 -38.1 -5.76
9 -39.7 -6.11
10 18.3 -33.9
11 17.9 -33.3
12 18.3 -33.9
13 -32.9 11.2
14 -31.7 9.49
15 -32.9 11.2
16 50.9 -4.98
17 49.4 -5.64
18 50.9 -4.98
19 -38.7 56.9
20 -38.0 54.9
21 -38.7 56.9
22 74.8 36.3
23 72.8 34.1
24 74.8 36.3