Skip to contents

Based on code from: https://github.com/bcm-uga/TESS3_encho_sen/blob/master/R/plotQ.R

Usage

tess_barplot(
  qmat,
  col_pal = algatr_col_default("base"),
  sort_by_Q = TRUE,
  legend = TRUE,
  legend_position = "bottomright",
  border = NA,
  space = 0,
  ...
)

Arguments

qmat

Q matrix

sort_by_Q

whether to sort bars by Q value (equivalent to barplot sort.by.Q)

legend

whether to display legend (defaults to TRUE)

legend_position

the x and y coordinates or keyword to determine legend position (defaults to bottom right)

border

the color to be used for the border of the bars. Use border = NA to omit borders. If there are shading lines, border = TRUE means use the same colour for the border as for the shading lines.

space

the amount of space (as a fraction of the average bar width) left before each bar. May be given as a single number or one number per bar. If height is a matrix and beside is TRUE, space may be specified by two numbers, where the first is the space between bars in the same group, and the second the space between the groups. If not given explicitly, it defaults to c(0,1) if height is a matrix and beside is TRUE, and to 0.2 otherwise.

...

other parameters of the function barplot.default.

Value

STRUCTURE-style bar plot of TESS results