Plot the samples cell division forest. This plot is carried out using
ggraph
and for simplicity of visualisation the forest is plot as a
set of trees connected to a generic wildtype cell.
Arguments
- forest
The samples forest to be plot.
- highlight_sample
If a sample name, the path from root to the sampled cells in the sample is highlighted. If
NULL
(default), nothing is highlighted.
Examples
sim <- SpatialSimulation()
sim$add_mutant(name = "A", growth_rates = 0.08, death_rates = 0.01)
sim$place_cell("A", 500, 500)
sim$run_up_to_time(60)
#>
[████████████████████████████████████████] 100% [00m:00s] Saving snapshot
sim$sample_cells("MySample", c(500, 500), c(510, 510))
forest <- sim$get_samples_forest()
plot_forest(forest)