Skip to content

Commit

Permalink
Merge branch 'master' of github.com:JetteReeg/BiTZ
Browse files Browse the repository at this point in the history
  • Loading branch information
JetteReeg committed Feb 17, 2022
2 parents b81867a + 3eccc5b commit b813ceb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Reeg_et_al_2021/Scripts/(0) Analyse_landscapes.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
require(ggplot2)
require(ggthemes)
require(data.table)
require(factoextra)
require(FactoMineR)
require(RColorBrewer)
require(pca3d)
Expand Down Expand Up @@ -92,6 +93,25 @@ col
pca3d(res.pca3d, group=gr, col=col)
snapshotPCA3d(file="FigB1.png")

# Figure B2
brewer.pal(n = 4, name = "Dark2")

plot.PCA <- fviz_pca_biplot(res.pca,
axes=c(1,2),
geom.ind = "point", # show points only (nbut not "text")
col.ind = factor(parameters$Cluster), # color by groups
palette = c("grey95", brewer.pal(n = 4, name = "Dark2")),
ggtheme = theme_few(),
repel=T,
addEllipses = FALSE, # Concentration ellipses
legend.title = "Landscape\ncluster",
title = ""
)

jpeg("Fig_B2.jpeg", width=140, height=140, units="mm", res=300)
plot.PCA
dev.off()

#####
# Figure B2

Expand Down

0 comments on commit b813ceb

Please sign in to comment.