Skip to contents

Autoplots for q_matrix objects

Usage

# S3 method for class 'q_matrix'
autoplot(
  object,
  data = NULL,
  annotate_group = TRUE,
  reorder_within_groups = FALSE,
  ...
)

Arguments

object

A Q matrix object (as returned by q_matrix()).

data

An associated tibble (e.g. a gen_tibble), with the individuals in the same order as the data used to generate the Q matrix

annotate_group

Boolean determining whether to annotate the plot with the group information

reorder_within_groups

Boolean determining whether to reorder the individuals within each group based on their ancestry proportion (note that this is not advised if you are making multiple plots, as you would get a different order for each plot!). If TRUE, annotate_group must also be TRUE.

...

not currently used.

Value

a barplot of individuals, coloured by ancestry proportion