Skip to contents

Function to paint a tree with ancestral and tip statess

Usage

paint_tree_with_states(
  parent_child_df,
  tr,
  scale_breaks = c(1, 0),
  scale_labels = c("Present", "Absent"),
  scale_colors = c("red", "black"),
  legend_name = "Trait"
)

Arguments

parent_child_df

Parent child dataframe from asr()

tr

Phylogenetic tree

scale_breaks

Values for breaks (marginal = c(1,0.5,0); joint = c(1,0))

scale_labels

Labels for present and absent, marginal should be c('Present','Unsure','Absent')

scale_colors

Colors for states

legend_name

Name for legend

Value

Tree object with painted states