| plot_model | R Documentation | 
Plot demographic history encoded in a slendr model
plot_model(
  model,
  sizes = TRUE,
  proportions = FALSE,
  gene_flow = TRUE,
  log = FALSE,
  order = NULL,
  file = NULL,
  samples = NULL,
  ...
)
model | 
 Compiled   | 
sizes | 
 Should population size changes be visualized?  | 
proportions | 
 Should gene flow proportions be visualized (  | 
gene_flow | 
 Should gene-flow arrows be visualized (default   | 
log | 
 Should the y-axis be plotted on a log scale? Useful for models over very long time-scales.  | 
order | 
 Order of the populations along the x-axis, given as a character
vector of population names. If   | 
file | 
 Output file for a figure saved via   | 
samples | 
 Sampling schedule to be visualized over the model  | 
... | 
 Optional argument which will be passed to   | 
A ggplot2 object with the visualized slendr model
init_env()
# load an example model with an already simulated tree sequence
path <- system.file("extdata/models/introgression", package = "slendr")
model <- read_model(path)
plot_model(model, sizes = FALSE, log = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.