Skip to contents

Plots multiple pairwise variable scores in a matrix layout.

Usage

plot_pairwise(
  scores,
  var_order = "seriate_max",
  score_limits = NULL,
  inner_width = 0.5,
  center_level = "all",
  na.value = "grey80",
  interactive = FALSE
)

Arguments

scores

The scores for the matrix plot. Either of class pairwise or identical in structure to object of class pairwise.

var_order

The variable order to be used. The default NULL means variables in are ordered alphabetically. A value of "seriate_max" means variables are re-ordered to emphasize pairs with maximum abolute scores. A value of "seriate_max_diff" means variables are re-ordered to emphasize pairs with maximum score differences. Otherwise Var_order must be a subset of variables in scores.

score_limits

a numeric vector of length specifying the limits of the scale.

inner_width

A number between 0 and 1 specifying radius of the inner bullseye.

center_level

Specifies which level of group goes into the innter bullseye. Defaults to "all".

na.value

used for scores with a value of NA

interactive

defaults to FALSE

Value

A girafe object if interactive==TRUE, otherwise a ggplot2.

If scores has one value for x,y pair, then a filled circle is drawn with fill representing the score value. If there are multiple values for each x,y pair then the filled circle is split into wedges, with the wedge fill representing the values. If some rows have group=center_level, then the glyph is drawn as a bullseye.

Examples

plot_pairwise(pair_cor(iris))

plot_pairwise(pairwise_scores(iris,by="Species"))