7.4 Biplots

The details on how to create biplots is already explained in protocol 1. Protocol 4 generates PCoA projections.

7.4.1 Biplot 2D

arrows_label_adj <- rbind(c(.5,0),c(.5,1),c(.5,0),c(.5,1),c(.5,0),
                          c(.5,1),c(.8,0),c(1,.5),c(.5,0),c(1,.2),
                          c(.5,1),c(.2,.7))
row.names(arrows_label_adj) <- c("S7","S8","S4","CaO","MgO",
                                 "S11","L48","SiO2","Ce","Nb",
                                 "Th","TiO2")

biplot2d3d::biplot_2d(prot4_Shipwreck_2d,
                      ordination_method = "PCoA",
                      invert_coordinates = c (TRUE,TRUE),
                      ylim = c(-.3,.25),
                      point_type = "point",
                      groups = factor_list_Shipwreck$ProvGroup,
                      group_color = color_list_Shipwreck$ProvGroup,
                      group_label_cex = 0.6,
                      arrow_mim_dist = .5,
                      arrow_label_cex = 0.6,
                      arrow_fig = c(.6,.95,0,.35),
                      arrow_label_adj_override = arrows_label_adj,
                      subtitle = prot4_Shipwreck_2d$sub2D,
                      test_text = 
                        prot4_Shipwreck_tests$text(prot4_Shipwreck_tests),
                      test_cex = 0.8,
                      test_fig = c(0, 0.5, 0.62, .99),
                      fitAnalysis_fig = c(0,.7,.05,.5),
                      output_type = "preview")
protocol 4 with shipwrecks

Figure 7.1: protocol 4 with shipwrecks

7.4.2 Biplot 3D

biplot2d3d::biplot_3d(prot4_Shipwreck_3d,
                      ordination_method = "PCoA",
                      point_type = "point",
                      groups = factor_list_Shipwreck$FabricGroup,
                      group_color = color_list_Shipwreck$FabricGroup,
                      group_representation = "stars",
                      star_centroid_radius = 0,
                      star_label_cex = .8,
                      arrow_min_dist = .5,
                      arrow_body_length = .025,
                      subtitle = prot4_Shipwreck_3d$sub3D,
                      test_text = 
                        prot4_Shipwreck_tests$text(prot4_Shipwreck_tests),
                      test_cex = 1.25,
                      test_fig = c(0, 0.5, 0.65, .99),
                      view_zoom = 0.9)

biplot2d3d::animation(directory = directories$prot4_Shipwreck,
                       file_name = "Prot4_Shipwreck_Biplot3D")
Prot4_Shipwreck_Biplot3D.gif

Prot4_Shipwreck_Biplot3D.gif