| plot.dynet_paths | R Documentation |
A result from paths() records the optimality criterion it was found
under, and such a result is drawn as a trajectory tree by
plot_path_trajectories(). That is the right picture for an
endpoint-local family: the routes need not share prefix-optimal
subpaths, so a vertex reached under two different temporal histories
appears twice rather than being forced into one predecessor tree.
Older serialised results carry no criterion. Those are drawn by the legacy
predecessor-tree renderer, which only defines a tree when the sessions were
collapsed; a bounded or separate-session result of that vintage raises
dynet_unsupported_plot instead of implying a tree the criterion never
promised.
## S3 method for class 'dynet_paths'
plot(x, palette = "okabe", ...)
x |
A |
palette |
Palette specification, as in |
... |
Passed to |
A ggplot object for a result carrying criterion metadata, which
is every result paths() returns. A legacy result without it is drawn on
the current device by cograph::splot() and x is returned invisibly.
A legacy result raises dynet_unsupported_plot when its sessions were
not collapsed, dynet_empty_result when the source reaches no other
vertex, dynet_bad_palette for an unusable palette, and
dynet_needs_cograph when cograph is not installed.
dn <- dynet(school_contacts)
journeys <- paths(dn, from = "Ana")
plot(journeys)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.