plot_topology: Plot the topology of a trajectory

Description Usage Arguments Value Examples

Description

Plot the topology of a trajectory

Usage

1
2
3
4
5
6
7
plot_topology(
  trajectory,
  color_milestones = c("auto", "given", "cubeHelix", "Set3", "rainbow"),
  milestones = NULL,
  layout = NULL,
  arrow = grid::arrow(type = "closed", length = unit(0.4, "cm"))
)

Arguments

trajectory

A dynwrap trajectory.

color_milestones

Which palette to use for colouring the milestones

  • auto: Determine colours automatically. If color is already specified in milestones tibble, this will be used. Otherwise, the colour scheme is determined by milestone_palette_list$auto.

  • given: The milestones object already contains a column color.

  • cubeHelix: Use the rje::cubeHelix() palette.

  • Set3: Use the RColorBrewer::brewer.pal(name = "Set3") palette.

  • rainbow: Use the grDevices::rainbow() palette.

milestones

Tibble containing the column milestone_id (character). If color_milestones is set to "given", this tibble should also contain a column color (character), containing colour hex codes (e.g. "#123456").

layout

The type of layout to create. See ggraph::ggraph() for more info.

arrow

The type and size of arrow in case of directed trajectories. Set to NULL to remove arrow altogether.

Value

A topology ggplot of a trajectory.

Examples

1
2
3
4
5

dynplot documentation built on Dec. 11, 2021, 9:33 a.m.