# Read example gt_admix object
admix_obj <-
readRDS(system.file("extdata", "anolis", "anole_adm_k3.rds",
package = "tidypopgen"
))
# Cross-validation plot
autoplot(admix_obj, type = "cv")
# Basic barplot
autoplot(admix_obj, k = 3, run = 1, type = "barplot")
# Barplot with individuals arranged by Q proportion
# (using additional arguments, see `autoplot.q_matrix` for details)
autoplot(admix_obj,
k = 3, run = 1, type = "barplot", annotate_group = TRUE,
arrange_by_group = TRUE, arrange_by_indiv = TRUE,
reorder_within_groups = TRUE
)
Run the code above in your browser using DataLab